ChartProgressBar-iOS icon indicating copy to clipboard operation
ChartProgressBar-iOS copied to clipboard

Unable to remove old title and values from ChartProgressbar

Open NaiyerAghaz opened this issue 7 years ago • 4 comments

Hello sir I want to update the chartprogressbar with new data array but its overlap with old one data Kindly see the attachment below 9177d958-f2af-4334-b4ec-fc3bfa7a1027

NaiyerAghaz avatar Jul 27 '18 14:07 NaiyerAghaz

Hello Naiyer,

Sorry for the late reply,

It seems that I am not clearing the views when I call the build function,

public func build() {
    //Clear all views if exist 
}

Unfortunately, I don't have time to fix this bug now,

I will be grateful If you fix it and send me a PR.

Have a good day

hadiidbouk avatar Aug 07 '18 05:08 hadiidbouk

@hadiidbouk hey! Please, write exactly, what should be cleared?

danchokobo avatar Aug 21 '18 09:08 danchokobo

@NaiyerAghaz did you resolve it?

danchokobo avatar Aug 21 '18 11:08 danchokobo

@danchokobo Thank you for using the library,

The ChartProgressBar is a UIView that contains views built at runtime, so my first guess to fix this problem is to clear all the subviews from the ChartProgressBar when calling the build function.

Try to add the below code inside the ChartProgressBar#Build() - on top :

for view in self.subviews {
    view.removeFromSuperview()
}

Sorry I can't solve this bug soon, I don't have so much time for this, but I will help you till the problem is resolved.

hadiidbouk avatar Aug 23 '18 10:08 hadiidbouk