Hi,
I use the cursor to color a single bar in the series chart. However, based on the value, I would like the cursor to be cleared or hidden. It’s possible?
i tried like this but the cursor remains
static void createCursor( lv_chart_series_t * ser1, uint16_t indexofbar )
{
cursor[indexofbar] = lv_chart_add_cursor( chart, LGL_COLOR_RED, LV_CHART_CURSOR_DOWN );
lv_point_t point = { lv_chart_get_x_from_index( chart, ser1, indexofbar ), lv_chart_get_y_from_index( chart, ser1, indexofbar ) };
lv_chart_set_cursor_point( chart, cursor[indexofbar], &point );
}
static void hideCursor ( lv_chart_series_t * ser1, uint16_t indexofbar )
{
lv_point_t point = { lv_chart_get_x_from_index( chart, ser1, indexofbar ), 0};
lv_chart_set_cursor_point( chart, cursor[indexofbar], &point );
}
Thanks Walter