LVGL v8.2
I’m using ‘chart’ widget (TFT 800*480) and while SLS do not fully support it initialization do as follow:
lv_obj_t * ui_ChartBat;
lv_chart_series_t *ser1,*ser2;
#define ui_ChartBatPointNum 10
int16_t Bufy[ui_ChartBatPointNum] = {0,2,4,6,8,10,12,14,16,18};
int16_t Bufx[ui_ChartBatPointNum] = {0,1,2,3,4,5,6,7,8,9};
ui_ChartBat = lv_chart_create(ui_ScreenMain);
lv_obj_set_width(ui_ChartBat, 794);
lv_obj_set_height(ui_ChartBat, 251);
lv_obj_set_x(ui_ChartBat, 0);
lv_obj_set_y(ui_ChartBat, 0);
lv_obj_set_align(ui_ChartBat, LV_ALIGN_BOTTOM_MID);
lv_chart_set_type(ui_ChartBat, LV_CHART_TYPE_LINE);// Show lines and points too
ser1 = lv_chart_add_series(ui_ChartBat, lv_palette_main(LV_PALETTE_RED), LV_CHART_AXIS_PRIMARY_Y);
ser2 = lv_chart_add_series(ui_ChartBat, lv_palette_main(LV_PALETTE_GREEN), LV_CHART_AXIS_SECONDARY_Y);
lv_chart_set_div_line_count(ui_ChartBat,6,10);// кол-во разделительных линий x,y
lv_chart_set_point_count(ui_ChartBat,ui_ChartBatPointNum);// количество точек (x=y)
lv_chart_set_range(ui_ChartBat,LV_CHART_AXIS_PRIMARY_Y,0,20);
lv_chart_set_range(ui_ChartBat,LV_CHART_AXIS_PRIMARY_X,0,10);
ser1->x_points = &Bufx[0];ser1->y_points = &Bufy[0];
lv_chart_set_update_mode(ui_ChartBat,LV_CHART_UPDATE_MODE_SHIFT);
// this calls do not work
lv_chart_set_axis_tick(ui_ChartBat,LV_CHART_AXIS_PRIMARY_Y,10,5,5,1,true,50);
lv_chart_set_axis_tick(ui_ChartBat,LV_CHART_AXIS_PRIMARY_X,10,5,5,1,true,50);
Everything looks good, exept a last two calls of lv_chart_set_axis_tick do not work. There are no axis ticks, neither labels.
My project is highly customized and it looks like something resources needed for ‘chart’ has been disabled. Please help to undestand the problem…