| 65 | } |
| 66 | |
| 67 | void StatChart::UpdateLines(const std::map<QString, std::vector<int32_t>>& value) { |
| 68 | ctx_->PostUITask([=, this]() { |
| 69 | auto beg = TimeUtil::GetCurrentTimestamp(); |
| 70 | for (auto& [in_n, in_v] : value) { |
| 71 | for (auto& [n, s] : series_) { |
| 72 | if (in_n == n) { |
| 73 | QList<QPointF> points; |
| 74 | for (int i = 0; i < in_v.size(); i++) { |
| 75 | points.push_back(QPointF(i, in_v.at(i))); |
| 76 | } |
| 77 | ///s->clear(); |
| 78 | s->replace(points); |
| 79 | break; |
| 80 | } |
| 81 | } |
| 82 | } |
| 83 | chart_view_->update(); |
| 84 | auto end = TimeUtil::GetCurrentTimestamp(); |
| 85 | //LOGI("UpdateLines UI, {}ms", (end-beg)); |
| 86 | }); |
| 87 | } |
| 88 | |
| 89 | } |
no test coverage detected