Hide or delete chart cursor

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

Hi,
My mistake. Having an update thread, I was creating many cursors in the same location. That’s why I always saw it present even if I tried to hide it.
Thanks
Walter

Hi
Good, you found it.:+1:
But another possible solution is hiding by playing with the style of the cursor.