| 673 | } |
| 674 | |
| 675 | void XChart::ClearInner() { |
| 676 | |
| 677 | std::for_each(geoms_.begin(), geoms_.end(), [this](auto &geom) { geom->Clear(); }); |
| 678 | |
| 679 | this->legendController_->ClearInner(); |
| 680 | this->guideController_->ClearInner(); |
| 681 | |
| 682 | this->padding_ = userPadding_; |
| 683 | |
| 684 | if(this->coord_ != nullptr) { |
| 685 | util::Point start = util::Point{this->margin_[0] + this->padding_[0], this->margin_[1] + this->height_ - this->padding_[3]}; |
| 686 | util::Point end = util::Point{this->margin_[0] + this->width_ - this->padding_[2], this->margin_[1] + this->padding_[1]}; |
| 687 | |
| 688 | this->coord_->Reset(start, end); |
| 689 | } |
| 690 | |
| 691 | NotifyAction(ACTION_CHART_CLEAR_INNER); |
| 692 | |
| 693 | axisController_->Clear(); |
| 694 | if(canvasContext_ != nullptr) { |
| 695 | canvasContext_->Reset(); |
| 696 | } |
| 697 | } |
| 698 | |
| 699 | void XChart::Redraw() { |
| 700 | if(!canvasContext_->IsValid()) { |