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

Method ClearScale

tests/unit/scale/ScaleController.h:133–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131 }
132
133 static bool ClearScale() {
134 nlohmann::json data = {{{"field", "2017"}}};
135 scale::ScaleController ctrl(nullptr);
136 auto coord = ScaleController::MakeCoord();
137 auto &scale = ctrl.CreateScale("field", data, ScaleController::MakeTracer(), coord);
138 bool ret1 = ctrl.ScaleCount() == 1;
139 ctrl.Clear();
140 bool ret2 = ctrl.Empty();
141 return ret1 && ret2;
142 }
143};
144
145}//unit

Callers

nothing calls this directly

Calls 3

ScaleCountMethod · 0.80
EmptyMethod · 0.80
ClearMethod · 0.45

Tested by

no test coverage detected