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

Method SetEnableListConfig

core/bridge/ChartBridge.cpp:306–320  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

304}
305
306void ChartBridge::SetEnableListConfig(const std::string &params){
307 if (chart_ == nullptr || params.empty()) {
308 return;
309 }
310 chart_->GetLogTracer()->trace("SetEnableListConfig %s ", params.c_str());
311 auto enableCfg = json::ParseString(params);
312 if (!enableCfg.is_object()) {
313 return;
314 }
315 EnableListConfig enableConfig;
316 enableConfig.imageGuideEnable = json::GetBool(enableCfg, "imageGuideEnable");
317 enableConfig.legendCenterEnable = json::GetBool(enableCfg, "legendCenterEnable");
318 enableConfig.candleFirstRenderFixDisable = json::GetBool(enableCfg, "candleFirstRenderFixDisable", false);
319 chart_->SetEnableConfig(enableConfig);
320}
321
322void ChartBridge::SetDarkModeInfo(bool isDark, std::map<int, int> &colors) {
323 if (chart_ == nullptr) {

Callers 1

Calls 6

ParseStringFunction · 0.85
GetBoolFunction · 0.85
traceMethod · 0.80
GetLogTracerMethod · 0.80
SetEnableConfigMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected