refactor(chart): add 'series' keyword in value setters/getters for consistency

This commit is contained in:
Gabor Kiss-Vamosi
2025-01-13 22:07:16 +01:00
parent 9cc9e7b503
commit 5f2888d93a
21 changed files with 102 additions and 57 deletions

View File

@@ -178,7 +178,7 @@ def create_ui():
chart_y_array = [10, 25, 50, 40, 30, 35, 60, 65, 70, 75]
chart.set_ext_y_array(series, chart_y_array)
chart.set_series_ext_y_array(series, chart_y_array)
# Add custom observer callback
chart_type_subject.add_observer_obj(

View File

@@ -77,7 +77,7 @@ static void create_ui(void)
lv_chart_series_t * series = lv_chart_add_series(chart, c3, LV_CHART_AXIS_PRIMARY_X);
static int32_t chart_y_array[10] = {10, 25, 50, 40, 30, 35, 60, 65, 70, 75};
lv_chart_set_ext_y_array(chart, series, chart_y_array);
lv_chart_set_series_ext_y_array(chart, series, chart_y_array);
/*Add custom observer callback*/
lv_subject_add_observer_obj(&chart_type_subject, chart_type_observer_cb, chart, NULL);

View File

@@ -174,7 +174,7 @@ void test_draw_task_hooking(void)
lv_chart_series_t * chart_set1 = lv_chart_add_series(chart, lv_palette_main(LV_PALETTE_YELLOW), 0);
lv_chart_series_t * chart_set2 = lv_chart_add_series(chart, lv_palette_main(LV_PALETTE_GREEN), 0);
lv_chart_series_t * chart_set3 = lv_chart_add_series(chart, lv_palette_main(LV_PALETTE_RED), 0);
lv_chart_set_range(chart, LV_CHART_AXIS_PRIMARY_Y, 0, 700);
lv_chart_set_axis_range(chart, LV_CHART_AXIS_PRIMARY_Y, 0, 700);
int32_t points[21] = {0, 31, 59, 81, 95, 100, 95, 81, 59, 31, 0, -31, -59, -81, -95, -100, -95, -81, -59, -31, 0};