/lvgl-3.7.0/examples/widgets/chart/ |
D | lv_example_chart_3.py | 4 if dsc.part == lv.PART.TICKS and dsc.id == lv.chart.AXIS.PRIMARY_X: 13 chart = lv.chart(lv.scr_act()) variable 14 chart.set_size(200, 150) 15 chart.center() 16 chart.set_type(lv.chart.TYPE.BAR) 17 chart.set_range(lv.chart.AXIS.PRIMARY_Y, 0, 100) 18 chart.set_range(lv.chart.AXIS.SECONDARY_Y, 0, 400) 19 chart.set_point_count(12) 20 chart.add_event_cb(draw_event_cb, lv.EVENT.DRAW_PART_BEGIN, None) 23 chart.set_axis_tick(lv.chart.AXIS.PRIMARY_X, 10, 5, 12, 3, True, 40) [all …]
|
D | lv_example_chart_3.c | 21 lv_obj_t * chart; in lv_example_chart_3() local 22 chart = lv_chart_create(lv_scr_act()); in lv_example_chart_3() 23 lv_obj_set_size(chart, 200, 150); in lv_example_chart_3() 24 lv_obj_center(chart); in lv_example_chart_3() 25 lv_chart_set_type(chart, LV_CHART_TYPE_BAR); in lv_example_chart_3() 26 lv_chart_set_range(chart, LV_CHART_AXIS_PRIMARY_Y, 0, 100); in lv_example_chart_3() 27 lv_chart_set_range(chart, LV_CHART_AXIS_SECONDARY_Y, 0, 400); in lv_example_chart_3() 28 lv_chart_set_point_count(chart, 12); in lv_example_chart_3() 29 lv_obj_add_event_cb(chart, draw_event_cb, LV_EVENT_DRAW_PART_BEGIN, NULL); in lv_example_chart_3() 32 lv_chart_set_axis_tick(chart, LV_CHART_AXIS_PRIMARY_X, 10, 5, 12, 3, true, 40); in lv_example_chart_3() [all …]
|
D | lv_example_chart_1.py | 2 chart = lv.chart(lv.scr_act()) variable 3 chart.set_size(200, 150) 4 chart.center() 5 chart.set_type(lv.chart.TYPE.LINE) # Show lines and points too 8 ser1 = chart.add_series(lv.palette_main(lv.PALETTE.RED), lv.chart.AXIS.PRIMARY_Y) 9 ser2 = chart.add_series(lv.palette_main(lv.PALETTE.GREEN), lv.chart.AXIS.SECONDARY_Y) 12 chart.set_next_value(ser1,10) 13 chart.set_next_value(ser1,10) 14 chart.set_next_value(ser1,10) 15 chart.set_next_value(ser1,10) [all …]
|
D | lv_example_chart_1.c | 7 lv_obj_t * chart; in lv_example_chart_1() local 8 chart = lv_chart_create(lv_scr_act()); in lv_example_chart_1() 9 lv_obj_set_size(chart, 200, 150); in lv_example_chart_1() 10 lv_obj_center(chart); in lv_example_chart_1() 11 lv_chart_set_type(chart, LV_CHART_TYPE_LINE); /*Show lines and points too*/ in lv_example_chart_1() 14 …lv_chart_series_t * ser1 = lv_chart_add_series(chart, lv_palette_main(LV_PALETTE_RED), LV_CHART_AX… in lv_example_chart_1() 15 …lv_chart_series_t * ser2 = lv_chart_add_series(chart, lv_palette_main(LV_PALETTE_GREEN), LV_CHART_… in lv_example_chart_1() 18 lv_chart_set_next_value(chart, ser1, 10); in lv_example_chart_1() 19 lv_chart_set_next_value(chart, ser1, 10); in lv_example_chart_1() 20 lv_chart_set_next_value(chart, ser1, 10); in lv_example_chart_1() [all …]
|
D | lv_example_chart_4.c | 7 lv_obj_t * chart = lv_event_get_target(e); in event_cb() local 10 lv_obj_invalidate(chart); in event_cb() 17 int32_t id = lv_chart_get_pressed_point(chart); in event_cb() 22 lv_chart_series_t * ser = lv_chart_get_series_next(chart, NULL); in event_cb() 25 lv_chart_get_point_pos_by_id(chart, ser, id, &p); in event_cb() 27 lv_coord_t * y_array = lv_chart_get_y_array(chart, ser); in event_cb() 42 a.x1 = chart->coords.x1 + p.x - 20; in event_cb() 43 a.x2 = chart->coords.x1 + p.x + 20; in event_cb() 44 a.y1 = chart->coords.y1 + p.y - 30; in event_cb() 45 a.y2 = chart->coords.y1 + p.y - 10; in event_cb() [all …]
|
D | lv_example_chart_7.py | 20 start_point = chart.get_x_start_point(ser) 31 def add_data(timer,chart): argument 35 chart.set_next_value2(ser, x, y) 46 chart = lv.chart(lv.scr_act()) variable 47 chart.set_size(200, 150) 48 chart.align(lv.ALIGN.CENTER, 0, 0) 49 chart.add_event_cb(draw_event_cb, lv.EVENT.DRAW_PART_BEGIN, None) 50 chart.set_style_line_width(0, lv.PART.ITEMS) # Remove the lines 52 chart.set_type(lv.chart.TYPE.SCATTER) 54 chart.set_axis_tick(lv.chart.AXIS.PRIMARY_X, 5, 5, 5, 1, True, 30) [all …]
|
D | lv_example_chart_9.c | 6 lv_obj_t * chart = t->user_data; in add_data() local 7 lv_chart_series_t * ser = lv_chart_get_series_next(chart, NULL); in add_data() 9 lv_chart_set_next_value(chart, ser, lv_rand(10, 90)); in add_data() 11 uint16_t p = lv_chart_get_point_count(chart); in add_data() 12 uint16_t s = lv_chart_get_x_start_point(chart, ser); in add_data() 13 lv_coord_t * a = lv_chart_get_y_array(chart, ser); in add_data() 19 lv_chart_refresh(chart); in add_data() 28 lv_obj_t * chart = lv_chart_create(lv_scr_act()); in lv_example_chart_9() local 29 lv_chart_set_update_mode(chart, LV_CHART_UPDATE_MODE_CIRCULAR); in lv_example_chart_9() 30 lv_obj_set_size(chart, 200, 150); in lv_example_chart_9() [all …]
|
D | lv_example_chart_9.py | 5 chart.set_next_value(ser, lv.rand(10, 90)) 7 p = chart.get_point_count() 8 s = chart.get_x_start_point(ser) 9 a = chart.get_y_array(ser) 14 chart.refresh() 19 chart = lv.chart(lv.scr_act()) variable 21 chart.set_update_mode(lv.chart.UPDATE_MODE.CIRCULAR) 22 chart.set_size(200, 150) 23 chart.center() 25 chart.set_point_count(30) [all …]
|
D | lv_example_chart_7.c | 32 lv_obj_t * chart = timer->user_data; in add_data() local 33 …lv_chart_set_next_value2(chart, lv_chart_get_series_next(chart, NULL), lv_rand(0, 200), lv_rand(0,… in add_data() 41 lv_obj_t * chart = lv_chart_create(lv_scr_act()); in lv_example_chart_7() local 42 lv_obj_set_size(chart, 200, 150); in lv_example_chart_7() 43 lv_obj_align(chart, LV_ALIGN_CENTER, 0, 0); in lv_example_chart_7() 44 lv_obj_add_event_cb(chart, draw_event_cb, LV_EVENT_DRAW_PART_BEGIN, NULL); in lv_example_chart_7() 45 lv_obj_set_style_line_width(chart, 0, LV_PART_ITEMS); /*Remove the lines*/ in lv_example_chart_7() 47 lv_chart_set_type(chart, LV_CHART_TYPE_SCATTER); in lv_example_chart_7() 49 lv_chart_set_axis_tick(chart, LV_CHART_AXIS_PRIMARY_X, 5, 5, 5, 1, true, 30); in lv_example_chart_7() 50 lv_chart_set_axis_tick(chart, LV_CHART_AXIS_PRIMARY_Y, 10, 5, 6, 5, true, 50); in lv_example_chart_7() [all …]
|
D | lv_example_chart_5.py | 49 chart.set_zoom_x(v) 55 chart.set_zoom_y(v) 64 chart = lv.chart(lv.scr_act()) variable 65 chart.set_size(200, 150) 66 chart.align(lv.ALIGN.CENTER, -30, -30) 67 chart.set_range(lv.chart.AXIS.PRIMARY_Y, -1000, 1000) 70 chart.set_style_size(0, lv.PART.INDICATOR) 72 ser = chart.add_series(lv.palette_main(lv.PALETTE.RED), lv.chart.AXIS.PRIMARY_Y) 75 chart.set_point_count(pcnt) 76 chart.set_ext_y_array(ser, ecg_sample) [all …]
|
D | lv_example_chart_4.py | 3 chart = e.get_target() 6 chart.invalidate() 12 id = lv.chart.get_pressed_point(chart) 18 chart.get_point_pos_by_id(series[i], id, p) 32 chart.get_coords(coords) 42 chart.invalidate() 49 chart = lv.chart(lv.scr_act()) variable 50 chart.set_size(200, 150) 51 chart.center() 53 chart.add_event_cb(event_cb, lv.EVENT.ALL, None) [all …]
|
D | lv_example_chart_5.c | 4 static lv_obj_t * chart; variable 53 lv_chart_set_zoom_x(chart, v); in slider_x_event_cb() 60 lv_chart_set_zoom_y(chart, v); in slider_y_event_cb() 71 chart = lv_chart_create(lv_scr_act()); in lv_example_chart_5() 72 lv_obj_set_size(chart, 200, 150); in lv_example_chart_5() 73 lv_obj_align(chart, LV_ALIGN_CENTER, -30, -30); in lv_example_chart_5() 74 lv_chart_set_range(chart, LV_CHART_AXIS_PRIMARY_Y, -1000, 1000); in lv_example_chart_5() 77 lv_obj_set_style_size(chart, 0, LV_PART_INDICATOR); in lv_example_chart_5() 79 …lv_chart_series_t * ser = lv_chart_add_series(chart, lv_palette_main(LV_PALETTE_RED), LV_CHART_AXI… in lv_example_chart_5() 82 lv_chart_set_point_count(chart, pcnt); in lv_example_chart_5() [all …]
|
D | lv_example_chart_6.py | 9 chart = lv.chart(lv.scr_act()) 10 chart.set_size(200, 150) 11 chart.align(lv.ALIGN.CENTER, 0, -10) 13 chart.set_axis_tick(lv.chart.AXIS.PRIMARY_Y, 10, 5, 6, 5, True, 40) 14 chart.set_axis_tick(lv.chart.AXIS.PRIMARY_X, 10, 5, 10, 1, True, 30) 16 chart.add_event_cb(self.event_cb, lv.EVENT.ALL, None) 17 chart.refresh_ext_draw_size() 19 … self.cursor = chart.add_cursor(lv.palette_main(lv.PALETTE.BLUE), lv.DIR.LEFT | lv.DIR.BOTTOM) 21 self.ser = chart.add_series(lv.palette_main(lv.PALETTE.RED), lv.chart.AXIS.PRIMARY_Y) 28 newser = chart.get_series_next(None) [all …]
|
D | index.rst | 5 .. lv_example:: widgets/chart/lv_example_chart_1 9 Faded area line chart with custom division lines 12 .. lv_example:: widgets/chart/lv_example_chart_2 18 .. lv_example:: widgets/chart/lv_example_chart_3 24 .. lv_example:: widgets/chart/lv_example_chart_4 30 .. lv_example:: widgets/chart/lv_example_chart_5 36 .. lv_example:: widgets/chart/lv_example_chart_6 39 Scatter chart 42 .. lv_example:: widgets/chart/lv_example_chart_7 45 Stacked area chart [all …]
|
D | lv_example_chart_6.c | 4 static lv_obj_t * chart; variable 25 lv_coord_t * data_array = lv_chart_get_y_array(chart, ser); in event_cb() 62 chart = lv_chart_create(lv_scr_act()); in lv_example_chart_6() 63 lv_obj_set_size(chart, 200, 150); in lv_example_chart_6() 64 lv_obj_align(chart, LV_ALIGN_CENTER, 0, -10); in lv_example_chart_6() 66 lv_chart_set_axis_tick(chart, LV_CHART_AXIS_PRIMARY_Y, 10, 5, 6, 5, true, 40); in lv_example_chart_6() 67 lv_chart_set_axis_tick(chart, LV_CHART_AXIS_PRIMARY_X, 10, 5, 10, 1, true, 30); in lv_example_chart_6() 69 lv_obj_add_event_cb(chart, event_cb, LV_EVENT_ALL, NULL); in lv_example_chart_6() 70 lv_obj_refresh_ext_draw_size(chart); in lv_example_chart_6() 72 …cursor = lv_chart_add_cursor(chart, lv_palette_main(LV_PALETTE_BLUE), LV_DIR_LEFT | LV_DIR_BOTTOM); in lv_example_chart_6() [all …]
|
D | lv_example_chart_8.py | 77 stacked_area_chart.obj = lv.chart(lv.scr_act()) 80 stacked_area_chart.obj.set_type( lv.chart.TYPE.LINE) 85 stacked_area_chart.obj.set_range(lv.chart.AXIS.PRIMARY_Y,0,100) 86 stacked_area_chart.obj.set_axis_tick(lv.chart.AXIS.PRIMARY_Y, 3, 0, 5, 1, True, 30) 92 …st[0] = stacked_area_chart.obj.add_series(lv.palette_main(lv.PALETTE.RED), lv.chart.AXIS.PRIMARY_Y) 93 …t[1] = stacked_area_chart.obj.add_series(lv.palette_main(lv.PALETTE.BLUE), lv.chart.AXIS.PRIMARY_Y) 94 …[2] = stacked_area_chart.obj.add_series(lv.palette_main(lv.PALETTE.GREEN), lv.chart.AXIS.PRIMARY_Y)
|
D | lv_example_chart_2.py | 60 chart1 = lv.chart(lv.scr_act()) 63 chart1.set_type(lv.chart.TYPE.LINE) # Show lines and points too 66 chart1.set_update_mode(lv.chart.UPDATE_MODE.CIRCULAR) 69 ser1 = chart1.add_series(lv.palette_main(lv.PALETTE.RED), lv.chart.AXIS.PRIMARY_Y) 70 ser2 = chart1.add_series(lv.palette_main(lv.PALETTE.BLUE), lv.chart.AXIS.SECONDARY_Y)
|
/lvgl-3.7.0/src/extra/widgets/chart/ |
D | lv_chart.c | 79 lv_chart_t * chart = (lv_chart_t *)obj; in lv_chart_set_type() local 80 if(chart->type == type) return; in lv_chart_set_type() 82 if(chart->type == LV_CHART_TYPE_SCATTER) { in lv_chart_set_type() 84 _LV_LL_READ_BACK(&chart->series_ll, ser) { in lv_chart_set_type() 92 _LV_LL_READ_BACK(&chart->series_ll, ser) { in lv_chart_set_type() 93 ser->x_points = lv_mem_alloc(sizeof(lv_point_t) * chart->point_cnt); in lv_chart_set_type() 99 chart->type = type; in lv_chart_set_type() 108 lv_chart_t * chart = (lv_chart_t *)obj; in lv_chart_set_point_count() local 109 if(chart->point_cnt == cnt) return; in lv_chart_set_point_count() 115 _LV_LL_READ_BACK(&chart->series_ll, ser) { in lv_chart_set_point_count() [all …]
|
D | lv_chart.h | 290 void lv_chart_hide_series(lv_obj_t * chart, lv_chart_series_t * series, bool hide); 298 void lv_chart_set_series_color(lv_obj_t * chart, lv_chart_series_t * series, lv_color_t color); 315 lv_chart_series_t * lv_chart_get_series_next(const lv_obj_t * chart, const lv_chart_series_t * ser); 336 void lv_chart_set_cursor_pos(lv_obj_t * chart, lv_chart_cursor_t * cursor, lv_point_t * pos); 345 void lv_chart_set_cursor_point(lv_obj_t * chart, lv_chart_cursor_t * cursor, lv_chart_series_t * se… 354 lv_point_t lv_chart_get_cursor_point(lv_obj_t * chart, lv_chart_cursor_t * cursor);
|
/lvgl-3.7.0/examples/anim/ |
D | lv_example_anim_3.py | 74 self.chart = lv.chart(par) 75 self.chart.set_style_pad_all(0, lv.PART.MAIN) 76 self.chart.set_style_size(0, lv.PART.INDICATOR) 77 self.chart.set_type(lv.chart.TYPE.SCATTER) 78 self.ser1 = self.chart.add_series(lv.palette_main(lv.PALETTE.RED), lv.chart.AXIS.PRIMARY_Y) 79 self.chart.set_range(lv.chart.AXIS.PRIMARY_Y, 0, 1024) 80 self.chart.set_range(lv.chart.AXIS.PRIMARY_X, 0, 1024) 81 self.chart.set_point_count(CHART_POINTS_NUM) 82 self.chart.set_grid_cell(lv.GRID_ALIGN.STRETCH, 0, 3,lv.GRID_ALIGN.STRETCH, 3, 1) 88 self.chart.set_value_by_id2(self.ser1, i, t, step) [all …]
|
D | lv_example_anim_3.c | 15 lv_obj_t * chart; member 81 lv_chart_set_value_by_id2(ginfo.chart, ginfo.ser1, i, t, step); in refer_chart_cubic_bezier() 83 lv_chart_refresh(ginfo.chart); in refer_chart_cubic_bezier() 154 ginfo.chart = lv_chart_create(par); in page_obj_init() 155 lv_obj_set_style_pad_all(ginfo.chart, 0, LV_PART_MAIN); in page_obj_init() 156 lv_obj_set_style_size(ginfo.chart, 0, LV_PART_INDICATOR); in page_obj_init() 157 lv_chart_set_type(ginfo.chart, LV_CHART_TYPE_SCATTER); in page_obj_init() 158 …ginfo.ser1 = lv_chart_add_series(ginfo.chart, lv_palette_main(LV_PALETTE_RED), LV_CHART_AXIS_PRIMA… in page_obj_init() 159 lv_chart_set_range(ginfo.chart, LV_CHART_AXIS_PRIMARY_Y, 0, 1024); in page_obj_init() 160 lv_chart_set_range(ginfo.chart, LV_CHART_AXIS_PRIMARY_X, 0, 1024); in page_obj_init() [all …]
|
/lvgl-3.7.0/docs/widgets/extra/ |
D | chart.md | 15 - `LV_PART_MAIN` The background of the chart. Uses all the typical background and *line* (for the d… 16 - `LV_PART_SCROLLBAR` The scrollbar used if the chart is zoomed. See the [Base object](/widgets/obj… 18 …- Line chart: The *line* properties are used by the lines. `width`, `height`, `bg_color` and `radi… 19 …- Bar chart: The typical background properties are used to style the bars. `pad_column` sets the s… 20 - `LV_PART_INDICATOR` Refers to the points on line and scatter chart (small circles or squares). 32 - `LV_CHART_TYPE_SCATTER` - X/Y chart drawing point's and lines between the points. . 34 You can specify the display type with `lv_chart_set_type(chart, LV_CHART_TYPE_...)`. 38 You can add any number of series to the charts by `lv_chart_add_series(chart, color, axis)`. This a… 48 `lv_chart_set_ext_y_array(chart, ser, value_array)` makes the chart use an external array for the g… 50 The array's pointer will be saved in the chart so it needs to be global, static or dynamically allo… [all …]
|
D | index.md | 10 chart
|
/lvgl-3.7.0/demos/widgets/ |
D | lv_demo_widgets.py | 249 chart = lv.chart(parent, None) 250 chart.add_style(lv.chart.PART.BG, style_box) 252 …chart.set_style_local_text_font(lv.chart.PART.SERIES_BG, lv.STATE.DEFAULT, lv.theme_get_font_small… 254 chart.set_drag_parent(True) 255 chart.set_style_local_value_str(lv.cont.PART.MAIN, lv.STATE.DEFAULT, "Line chart") 256 chart.set_width_margin(grid_w_chart) 257 chart.set_height_margin(grid_h_chart) 258 chart.set_div_line_count(3, 0) 259 chart.set_point_count(8) 260 chart.set_type(lv.chart.TYPE.LINE) [all …]
|
/lvgl-3.7.0/examples/widgets/meter/ |
D | index.rst | 23 Pie chart
|