You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When users tap on a multi-lines line chart I want to make the nearest selected line change either it's width or it's color to let them know which line they're selecting.
What I could think about solving this problem in a method of ChartViewDelegate:
func chartValueSelected(chartView: ChartViewBase, entry: ChartDataEntry, dataSetIndex: Int, highlight: ChartHighlight){
switch dataSetIndex{
case 0:
// reset chart to highlight line 0
case 1:
// reset chart to highlight line 1
default: //...
}
This method seem to be the only one that allows me to do some changes to a line chart depending on user's tapping on a line chart.
I could reset a line chart's data set which contains the line width/color properties to achieve what I want,
but I think it's not worthy to reset a whole chart for highlighting just one line.
Is there any easier way to do this?
Thanks for this awesome library and your support!
The text was updated successfully, but these errors were encountered:
I would prefer override drawLinear/Cubic to check highlight there and highlight the line by colors. Overrding highlighted method would require another loop connecting the dots
When users tap on a multi-lines line chart I want to make the nearest selected line change either it's width or it's color to let them know which line they're selecting.
What I could think about solving this problem in a method of
ChartViewDelegate
:This method seem to be the only one that allows me to do some changes to a line chart depending on user's tapping on a line chart.
I could reset a line chart's data set which contains the line width/color properties to achieve what I want,
but I think it's not worthy to reset a whole chart for highlighting just one line.
Is there any easier way to do this?
Thanks for this awesome library and your support!
The text was updated successfully, but these errors were encountered: