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

Method MakeKLineScale

tests/unit/scale/ScaleController.h:111–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109 }
110
111 static bool MakeKLineScale() {
112 nlohmann::json config = {{"type", "kline-day"}};
113 nlohmann::json data = {{{"field", "2017"}}};
114 scale::ScaleController ctrl(nullptr);
115 ctrl.UpdateColConfig("field", config);
116 auto coord = ScaleController::MakeCoord();
117 auto &scale = ctrl.CreateScale("field", data, ScaleController::MakeTracer(), coord);
118 bool isKline = (*scale).GetType() == scale::ScaleType::Kline;
119 return isKline;
120 }
121
122 //创建不存在的scale,默认是identity
123 static bool MakeUnknowScale() {

Callers

nothing calls this directly

Calls 2

UpdateColConfigMethod · 0.80
GetTypeMethod · 0.45

Tested by

no test coverage detected