This is a migrated thread and some comments may be shown as answers.

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

1 Answer 47 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Megharaj
Top achievements
Rank 1
Megharaj asked on 13 Apr 2016, 01:01 PM

Hi,

Please refer  the attached image,

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

 

 

1 Answer, 1 is accepted

Sort by
0
Adrian
Telerik team
answered on 18 Apr 2016, 12:09 PM
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
Tags
Chart
Asked by
Megharaj
Top achievements
Rank 1
Answers by
Adrian
Telerik team
Share this question
or