LV_CHART_TYPE_LINE serie with only 1 element

Hi,
in line charts, if there is only one element in the series (I know it’s not a standard thing), the system crashes.

I solved it like this
In lv_chart.c in function:

static void draw_series_line(lv_obj_t * chart, const lv_area_t * series_area, const lv_area_t * clip_area)

add:

 if ( ext->point_cnt > 1 ){   // check if the series consists of only one element
			for(i = 0; i < ext->point_cnt; i++) {

Bye
Walter

Hi,

Thank you for reporting this.

Can you send a Pull request with this update?