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

2 posts, 0 answers
  1. Megharaj
    Megharaj avatar
    28 posts
    Member since:
    May 2015

    Posted 13 Apr Link to this post

    Hi,

    Please refer  the attached image,

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

     

     

  2. Adrian
    Admin
    Adrian avatar
    167 posts

    Posted 18 Apr 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)
        }


    Regards,
    Adrian
    Telerik
    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
  3. DevCraft banner
Back to Top