mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-26 11:07:34 +08:00
feat(chart): add curved type (#9564)
Co-authored-by: André <andre_miguel_costa@hotmail.com> Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
c7a959757c
commit
ade26a471b
@@ -582,7 +582,7 @@ these fields:
|
||||
:round_end: Rounds the line end.
|
||||
:raw_end: Set to 1 to skip end calculations if they are unnecessary.
|
||||
|
||||
+If a large amount of points needs to be rendered it's recommended to use ``points``
|
||||
If a large amount of points needs to be rendered it's recommended to use ``points``
|
||||
instead of ``p1`` and ``p2`` as it avoids creating many draw tasks.
|
||||
|
||||
Functions for line drawing:
|
||||
|
||||
@@ -60,11 +60,12 @@ Point count (number of data points in all data series added to the chart)
|
||||
- default 10
|
||||
- If you provide your own data-value arrays, each array so provided must contain
|
||||
at least this number of values.
|
||||
- For LINE-, BAR-, STACKED-charts, this is the number of points on the X axis.
|
||||
- LINE-, BAR-, STACKED-charts require only one data-value array to supply Y-values for each data point.
|
||||
- For LINE-, CURVE-, BAR-, STACKED-charts, this is the number of points on the X axis.
|
||||
- LINE-, CURVE-, BAR-, STACKED-charts require only one data-value array to supply Y-values for each data point.
|
||||
- For SCATTER charts, this is the number of scatter-points in the data series.
|
||||
- SCATTER charts have separate data-value arrays for both X-values and Y-values.
|
||||
|
||||
|
||||
Any number of data series
|
||||
|
||||
- After a chart is created, it initially contains no data series. You have to add them.
|
||||
@@ -157,6 +158,10 @@ A chart can be one of the following types:
|
||||
can also be illustrated if their ``width``, ``height``, ``bg_color`` and ``radius``
|
||||
styles (for :cpp:enumerator:`LV_PART_ITEMS`) are set and both ``width`` and
|
||||
``height`` have non-zero values.
|
||||
- :cpp:enumerator:`LV_CHART_TYPE_CURVE`: Similar to the LINE type, but it draws Bezier curves
|
||||
between data points. ``LV_USE_VECTOR_GRAPHICS`` and a draw unit (e.g. VGLite, or ThorVG for
|
||||
software rendering) need to be enabled. It also supports the ``line_dash_gap/width`` style
|
||||
properties.
|
||||
- :cpp:enumerator:`LV_CHART_TYPE_BAR`: Draw individual vertical bars for each point in each series.
|
||||
- :cpp:enumerator:`LV_CHART_TYPE_STACKED`: Draw vertical stacked bars where multiple data series
|
||||
are displayed as segments within a single bar for each data point. Supports only positive values.
|
||||
|
||||
Reference in New Issue
Block a user