Reputation: 1683
Don't know where to go from here.
I have a function:
func chartValueSelected(chartView: ChartViewBase, entry: ChartDataEntry, dataSetIndex: Int, highlight: ChartHighlight) {
print("\(entry.value) in \(months[entry.xIndex])")
}
but can't imagine how to show only selected value. How?
Thanks.
Upvotes: 1
Views: 1680
Reputation: 9754
there are many ways to do it.
Take a look at ChartsDemo, click line chart, and there is a chart marker can show it;
If you want to do it, you can override drawHighlighted
method, to draw the text you want.
Upvotes: 1