feat(chart) add rename lv_chart_set_cursor_point to lv_chart_set_cursor_pos and add lv_chart_set_cursor_point to stick the cursor to a point

This commit is contained in:
Gabor Kiss-Vamosi
2021-05-20 12:43:27 +02:00
parent 6c013fe158
commit 07fd3d2c96
4 changed files with 70 additions and 21 deletions

View File

@@ -15,8 +15,7 @@ static void event_cb(lv_event_t * e)
last_id = lv_chart_get_pressed_point(obj);
if(last_id != LV_CHART_POINT_NONE) {
lv_point_t p;
lv_chart_get_point_pos_by_id(obj, ser, last_id, &p);
lv_chart_set_cursor_point(obj, cursor, &p);
lv_chart_set_cursor_point(obj, cursor, NULL, last_id);
}
}
else if(code == LV_EVENT_DRAW_PART_END) {