SwiftCharts icon indicating copy to clipboard operation
SwiftCharts copied to clipboard

issue with gradient in line chart

Open honcharenko13 opened this issue 6 years ago • 2 comments

screen shot 2017-12-11 at 7 06 25 pm screen shot 2017-12-11 at 7 06 48 pm

If you look at each screenshot you will the same proportion of line gradient. The second screenshot is after zooming. did anybody faced with this?

honcharenko13 avatar Dec 11 '17 17:12 honcharenko13

@dehlen any ideas? https://github.com/i-schuetz/SwiftCharts/pull/303

ivnsch avatar Dec 13 '17 00:12 ivnsch

Not quite sure about that. Maybe if you could describe in a few words how zooming the graph works I could take a shot at it. My guess is that the gradient is redrawn for the visible graph if the graph changes (f.e when zooming the graph). If this is the case a possible fix could be to draw the gradient only once, or when necessary. However I did not look at the code since I am on a mobile phone right now. Can you confirm that the graph is redrawn when zooming or is it a simple transform ?

dehlen avatar Dec 13 '17 18:12 dehlen