MCPcopy Create free account
hub / github.com/antvis/F2Native / Render

Method Render

tests/unit/bridge/ChartBridge.h:55–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53 }
54
55 static bool Render() {
56 //提前初始化下
57 auto callback = [](const std::string &json) -> void {
58 };
59 bridge::BridgeRailingIOS railing(nullptr);
60
61 //chartConfig中data数据为空
62 bridge::ChartBridge bridge1(100, 100, 1.);
63 bridge1.SetRailing(&railing);
64 bool ret1 = bridge1.InvokeMethod("render", "{\"chartConfig\":{\"data\":\"\"}}", callback) == false;
65
66 //chartConfig中data数据为object
67 bridge::ChartBridge bridge2(100, 100, 1.);
68 bridge2.SetRailing(&railing);
69 bool ret2 = bridge2.InvokeMethod("render", "{\"chartConfig\":{\"data\":\"{}\"}}", callback) == false;
70
71 //chartConfig中data数据为空数组
72 bridge::ChartBridge bridge3(100, 100, 1.);
73 bridge3.SetRailing(&railing);
74 bool ret3 = bridge3.InvokeMethod("render", "{\"chartConfig\":{\"data\":\"[]\"}}", callback) == false;
75 return ret1 && ret2 && ret3;
76 }
77
78 static bool Render(const std::string &path, void *context, double width, double height, double ratio) {
79 //提前初始化下

Callers 5

ParseConfigEmptyMethod · 0.45
ParseConfigNoGeomsMethod · 0.45
Case1Method · 0.45
Case1Method · 0.45
Case1Method · 0.45

Calls 3

SetRailingMethod · 0.80
InvokeMethodMethod · 0.80
SetCanvasContextMethod · 0.45

Tested by

no test coverage detected