how to hide the color beside the legend in chart with swift?

Thread is closed for posting
2 posts, 0 answers
  1. Megharaj
    Megharaj avatar
    28 posts
    Member since:
    May 2015

    Posted 13 Apr 2016 Link to this post


    Please refer  the attached image,

    I would like to hide the hash color mark beside the legend in the chart.



  2. Adrian
    Adrian avatar
    174 posts

    Posted 18 Apr 2016 Link to this post

    Hello, Megharaj,

    To remove the icon of a legend item you should implement TKChartDelegate's chart:updateLegendItem:forSeries:atIndex method and replace the icon with a UIView with a zero frame. Consider the code below:
    func chart(chart: TKChart, updateLegendItem item: TKChartLegendItem, forSeries series: TKChartSeries, atIndex index: UInt) {
            item.icon = UIView(frame: CGRectZero)

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top