lv_chart_series_t * ser1;
lv_obj_t* chart ;
void demo11(){
// 显示图标
chart = lv_chart_create(lv_scr_act());
lv_chart_set_type(chart, LV_CHART_TYPE_LINE);
// 添加数据序列
ser1 = lv_chart_add_series(chart, lv_palette_main(LV_PALETTE_RED), LV_CHART_AXIS_PRIMARY_Y);
lv_chart_set_range(chart, LV_CHART_AXIS_PRIMARY_Y, 40, 150);
for (size_t i = 0; i < 10; i++)
{
lv_chart_set_next_value(chart, ser1, lv_rand(50,110));
}
lv_chart_refresh(chart);
}