Below is the example of using the GetWbkMd operation to get a workbook chart. The request contains an instance of opened workbook and parameters of getting various types of charts for the workbook. The response contains the requested charts.
{ "GetWbkMd" : { "tWbk" : { "id" : "S1!M!S!W5" }, "tArg" :
{ "pattern" : { "obInst" : "true", "lanerChart" : "true", "getLanerChart" : { "pattern" : { "data" : "false",
"decoration" : "false", "hiChart" : "false", "asImage" : { "width" : "400", "height" : "300", "dpi" : "96", "format" : "image\/png" } }
}, "getModellingChart" : { "pattern" : { "data" : "false", "decoration" : "false", "hiChart" : "false", "asImage" : {
"width" : "400", "height" : "300", "dpi" : "96", "format" : "image\/png" } } } } } } }
{ "GetWbkMdResult" : { "id" : { "id" : "S1!M!S!W5" }, "meta" : { "obInst" : { "obDesc" : {
"@isShortcut" : "0", "@isLink" : "0", "i" : "WBK_CALC", "n" : "Calculated series", "k" : "5541", "c" : "2827", "p" : "5471", "h" : "0" } },
"dirty" : "1", "windowsPosition" : "Vertical", "hasPivot" : "0", "hasLaner" : "1", "series" : { "@count" : "4", "its" : "" }, "lanerChart" :
{ "type" : "Simple", "series" : { "it" : [ { "type" : "Simple", "available" : "0", "visible" : "0"
}, { "type" : "Factor", "available" : "0", "visible" : "0" }, { "type" : "Fact", "available" : "0", "visible" : "1"
}, { "type" : "Modeling", "available" : "0", "visible" : "1" }, { "type" : "Forecast", "available" : "0", "visible" : "1"
}, { "type" : "Residuals", "available" : "0", "visible" : "1" }, { "type" : "UpperConfidenceLevel", "available" : "0", "visible" : "0"
}, { "type" : "LowerConfidenceLevel", "available" : "0", "visible" : "0" }, { "type" : "DUpperConfidenceLevel", "available" : "0", "visible" : "0"
}, { "type" : "DLowerConfidenceLevel", "available" : "0", "visible" : "0" }, { "type" : "B01", "available" : "0", "visible" : "1"
}, { "type" : "D10", "available" : "0", "visible" : "1" }, { "type" : "D11", "available" : "0", "visible" : "1"
}, { "type" : "D12", "available" : "0", "visible" : "1" }, { "type" : "D13", "available" : "0", "visible" : "1"
}, { "type" : "Aggregation", "available" : "0", "visible" : "1" }, { "type" : "Factors", "available" : "0", "visible" : "1"
}, { "type" : "Weights", "available" : "0", "visible" : "1" }, { "type" : "CompositionRelevance", "available" : "0", "visible" : "1"
} ] } }, "getLanerChart" : { "id" : { "id" : "S1!M!S!W5!wbkChart" },
"meta" : { "asImage" : "iVBORw0KGgoAAAANSUhEUgAAAZAAAAEsCAYAAADtt+XCAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAA8aSURBVHhe7dqBjptKEgVQPj1\/npVX8gshgIvrxgyuM5KlTEw11OkSV4w9\/fZDgAABAgQCgSmoUUKAAAECBH4LEENAgAABApGAAInYFBEgQICAADEDBAgQIBAJCJCITREBAgQICBAzQIAAAQKRgACJ2BQRIECAgAAxAwQIECAQCQiQiE0RAQIECAgQM0CAAAECkYAAidgUESBAgIAAMQMECBAgEAkIkIhNEQECBAgIEDNAgAABApGAAInYFBEgQICAADEDBAgQIBAJCJCITREBAgQICBAzQIAAAQKRgACJ2BQRIECAwFsBMk3b5Y\/3nq8n8\/J3\/AQIECBwX4E4QF6FwTJc5r\/vBc99KV05AQIEegnEAfJg2gqCraeP+ZNIL2bdEiBA4PsETguQZVh4Avm+4dERAQK9BU4JkDnpMziSAPn169dvLwZmwAyYgc\/PQCUaTwmQtbBIAmTewGOA\/BAgQIDA+QLV++3QAFmGxNrv6Qfo1YbOp3UGAgQIfLdA9X77VoAsCdNwqGxFtaHKWo4hQIAAgW2B6v12aICcuSHVhs68BmsTIECgg0D1fitAOkyDHgkQIHBAQIAcwHIoAQIECPwRECCmgQABAgQiAQESsSkiQIAAAQFiBggQIEAgEhAgEZsiAgQIEBAgZoAAAQIEIgEBErEpIkCAAAEBYgYIECBAIBIQIBGbIgIECBAQIGaAAAECBCIBARKxKSJAgAABAWIGCBAgQCASECARmyICBAgQECBmgAABAgQiAQESsSkiQIAAAQFiBggQIEAgEhAgEZsiAgQIEBAgZoAAAQIEIgEBErEpIkCAAAE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r0D1fhs9gWyBJx+OVzev2lB1PccRIECAwLpA9X47NEDO3IxqQ2deg7UJECDQQaB6vxUgHaZBjwQIEDggIEAOYDmUAAECBP4ICBDTQIAAAQKRgACJ2BQRIECAgAAxAwQIECAQCQiQiE0RAQIECAgQM0CAAAECkYAAidgUESBAgIAAMQMECBAgEAkIkIhNEQECBAgIEDNAgAABApGAAInYFBEgQICAADEDBAgQIBAJCJCITREBAgQICBAzQIAAAQKRgACJ2BQRIECAgAAxAwQIECAQCQiQiE0RAQIECAgQM0CAAAECkYAAidgUESBAgIAAMQMECBAgEAkIkIhNEQECBAgIEDNAgAABApGAAInYFBEgQICAADEDBAgQIBAJCJCITREBAgQICBAzQIAAAQKRgACJ2BQRIECAgAAxAwQIECAQCQiQiE0RAQIECAgQM0CAAAECkYAAidgUESBAgIAAMQMECBAgEAkIkIhNEQECBAicHiDTNP1+vLZ+1t5\/VbO3bdWGbD0BAgQIvCdQvd9uJ8DO+efBsRYia++\/qnnVbrWhV+t4nwABAgT2Bar3WwFikggQIEDgL4GvCJBHE1sv+02AAAEC5wh8RYDMaaoNncNpVQIECPQRqN5v\/Qmrz0zolAABAiWB0wNk61tWj6t7vrf84Ny3sEp75yACBAhcKnBqgGx1tve13nc1qg29ex71BAgQ6C5Qvd9Gf8K6Arfa0BXX5pwECBD4JoHq\/VaAfNOu64UAAQIDBATIAERLECBAoKOAAOm463omQIDAAAEBMgDREgQIEOgoIEA67rqeCRAgMEBAgAxAtAQBAgQ6CgiQjruuZwIECAwQECADEC1BgACBjgICpOOu65kAAQIDBATIAERLECBAoKOAAOm463omQIDAAAEBMgDREgQIEOgoIEA67rqeCRAgMEBAgAxAtAQBAgQ6CgiQjruuZwIECAwQECADEC1BgACBjgICpOOu65kAAQIDBATIAERLECBAoKOAAOm463omQIDAAAEBMgDREgQIEOgoIEA67rqeCRAgMEBAgAxAtAQBAgQ6CgiQjruuZwIECAwQECADEC1BgACBjgICpOOu65kAAQIDBATIAERLECBAoKOAAOm463omQI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\/PlE8vz971vbm1xVxu653a5agIECPwcger99u0P0ZctJ+FQYas2VFnLMQQIECCwLVC93w4PkLM2pdrQWee3LgECBLoIVO+3AqTLROiTAAECRQEBUoRyGAECBAj8LSBATAQBAgQIRAICJGJTRIAAAQICxAwQIECAQCQgQCI2RQQIECAgQMwAAQIECEQCAiRiU0SAAAECAsQMECBAgEAkIEAiNkUECBAgIEDMAAECBAhEAgIkYlNEgAABAgLEDBAgQIBAJCBAIjZFBAgQICBAzAABAgQIRAICJGJTRIAAAQICxAwQIECAQCQgQCI2RQQIECAgQMwAAQIECEQCAiRiU0SAAAECAsQMECBAgEAkIEAiNkUECBAgIEDMAAECBAhEAgIkYlNEgAABAgLEDBAgQIBAJCBAIjZFBAgQICBAzAABAgQIRAICJGJTRIAAAQICxAwQIECAQCQgQCI2RQQIECAgQMwAAQIECEQCAiRiU0SAAAECAsQMECBAgEAkIEAiNkUECBAg8LEAmaZpU\/vx3vP1PGj5e3Wrqg1V13McAQIECKwLVO+323f\/guyrMFiGy\/z3veBZO3W1ocJlO4QAAQIEdgSq99u3AuRx\/q0g2Hr6mD+JHNnBakNH1nQsAQIECPwrUL3fnhogy7A4+gTyaMKLgRkwA2bg8zNQCdZDAbL2J6vKn6KexxwNkEoDjiFAgACBawQOBcjaJe79CevdJ5BrSJyVAAECBCoCwwNk+ZSx9nvlqaVy8Y4hQIAAgesE3g6Q5aULh+s205kJECDwSYHhAfLJi3cuAgQIELhOQIBcZ+\/MBAgQuLWAALn19rl4AgQIXCcgQK6zd2YCBAjcWkCA3Hr7XDwBAgSuExAg19k7MwECBG4tIEBuvX0ungABAtcJCJDr7J2ZAAECtxYQILfePhdPgACB6wQEyHX2zkyAAIFbCwiQW2+fiydAgMB1AgLkOntnJkCAwK0FBMitt8\/FEyBA4DqB\/wG7gU7950YJDgAAAABJRU5ErkJggg==", "toolTipImageMap" : "" } }, "getModellingChart" : { "id" : {
"id" : "S1!M!S!W5!wbkModChart" }, "meta" : { "asImage" : "iVBORw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ekmkt7oyAAAAAElFTkSuQmCC", "toolTipImageMap" : "" } } } } }
The GetWbkChart function gets various types of charts for a workbook. Input parameters:
wbk. Workbook instance.
After execution the function returns a result of data extraction. The console window displays information about chart series.
public static GetWbkMdResult GetWbkChart(WbkId wbk) { // Set chart get parameters GetChartArg ChartPtn = new GetChartArg() { pattern = new ChartMdPattern() {
data = false, decoration = false, hiChart = false, asImage = new ImageProperties() { format = "image/png", width = 400, height = 400, dpi = 96.0 }
} }; // Set operation execution parameters var tOp = new GetWbkMd { tWbk = wbk, tArg = new GetWbkMdArg {// Set data extraction pattern pattern = new WbkMdPattern {
getLanerChart = ChartPtn, lanerChart = true, getModellingChart = ChartPtn } } }; // Create proxy object for operation execution var somClient = new SomPortTypeClient(); // Execute operation var gRes = somClient.GetWbkMd(tOp);
// Save charts as images if (chartSave(gRes.meta.getLanerChart.meta.asImage, "C:\\LanerChart.png")) { Console.WriteLine("Workbook chart is saved in the LanerChart.png file"); } else { Console.WriteLine("Workbook chart is absent"); }; if (chartSave(gRes.meta.getModellingChart.meta.asImage, "C:\\ModellingChart.png")) { Console.WriteLine("Calculated series chart is saved in the ModellingChart.png file"); } else { Console.WriteLine("Calculated series chart is absent"); }; // Output data about workbook chart into the console window WbkChart lanerCh = gRes.meta.lanerChart; switch (lanerCh.type)
{ case WbkChartType.DetermAggregation: Console.WriteLine("Chart for data obtained after aggregation calculation"); break; case WbkChartType.Simple: Console.WriteLine("Chart for table data"); break; case WbkChartType.SpliceMethod: Console.WriteLine("Chart for data obtained after series splice"); break;
case WbkChartType.StatMethod: Console.WriteLine("Chart for data obtained after statistic method calculation"); break; }; int avable = 0; int vivsible = 0; List<string> series = new List<string>(); foreach (WbkChartSerie ser in lanerCh.series) { if (ser.available.Value) { avable++; series.Add(ser.type.ToString()); };
if (ser.visible.Value) { vivsible++; }; }; Console.WriteLine("Total number of series available for display: " + vivsible); Console.WriteLine("The following is available in the current chart from them:"); foreach (string s in series) { Console.WriteLine("".PadRight(3) + s); } Console.WriteLine("".PadRight(3) + "Total series: " + avable); return gRes; } // Function of saving chart to file public static bool chartSave(byte[] chart, string name)
{ if (chart.Length !=0) { MemoryStream fs = new MemoryStream(chart); Bitmap img = new Bitmap(fs); img.Save(name); img.Dispose(); fs.Dispose(); return true; } else { return false; }; }
See also: