| 454 | } |
| 455 | |
| 456 | std::vector<std::string> XChart::getYScaleFields() { |
| 457 | std::vector<std::string> _fields; |
| 458 | |
| 459 | std::for_each(geoms_.begin(), geoms_.end(), [&](auto &geom) -> void { |
| 460 | std::string yField = geom->GetYScaleField(); |
| 461 | |
| 462 | auto it = std::find(_fields.begin(), _fields.end(), yField); |
| 463 | if(it == _fields.end()) { |
| 464 | _fields.push_back(yField); |
| 465 | } |
| 466 | }); |
| 467 | return _fields; |
| 468 | } |
| 469 | |
| 470 | std::string XChart::GetScaleTicks(const std::string &field) noexcept { |
| 471 | nlohmann::json rst = {}; |