Skip to content

Conversation

@escherstair
Copy link

see #7369

@github-actions
Copy link
Contributor

github-actions bot commented Nov 20, 2025

Hi 👋, thank you for your PR!

We've run benchmarks in an emulated environment. Here are the results:

ARM Emulated 32b - lv_conf_perf32b

Scene Name Avg CPU (%) Avg FPS Avg Time (ms) Render Time (ms) Flush Time (ms)
All scenes avg. 28 37 7 7 0
Detailed Results Per Scene
Scene Name Avg CPU (%) Avg FPS Avg Time (ms) Render Time (ms) Flush Time (ms)
Empty screen 11 33 0 0 0
Moving wallpaper 2 33 1 1 0
Single rectangle 0 50 0 0 0
Multiple rectangles 0 39 0 0 0
Multiple RGB images 0 39 0 0 0
Multiple ARGB images 10 41 0 0 0
Rotated ARGB images 55 44 14 (-1) 14 (-1) 0
Multiple labels 7 (+1) 33 0 0 0
Screen sized text 94 (-1) 47 20 20 0
Multiple arcs 40 33 6 6 0
Containers 4 37 (-1) 0 0 0
Containers with overlay 86 (-11) 21 44 44 0
Containers with opa 9 (-3) 37 (+1) 0 (-1) 0 (-1) 0
Containers with opa_layer 20 (+2) 34 5 5 0
Containers with scrolling 47 (+2) 46 12 12 0
Widgets demo 66 (-1) 40 16 16 0
All scenes avg. 28 37 7 7 0

ARM Emulated 64b - lv_conf_perf64b

Scene Name Avg CPU (%) Avg FPS Avg Time (ms) Render Time (ms) Flush Time (ms)
All scenes avg. 24 38 6 6 0
Detailed Results Per Scene
Scene Name Avg CPU (%) Avg FPS Avg Time (ms) Render Time (ms) Flush Time (ms)
Empty screen 11 33 0 0 0
Moving wallpaper 1 33 0 0 0
Single rectangle 0 50 0 0 0
Multiple rectangles 0 46 0 0 0
Multiple RGB images 0 39 0 0 0
Multiple ARGB images 1 38 0 0 0
Rotated ARGB images 29 34 9 9 0
Multiple labels 3 42 (+7) 0 0 0
Screen sized text 82 46 (+1) 18 (+1) 18 (+1) 0
Multiple arcs 33 (-1) 33 6 6 0
Containers 4 37 (-2) 0 0 0
Containers with overlay 88 (+1) 23 42 (+1) 42 (+1) 0
Containers with opa 16 36 (-2) 1 (+1) 1 (+1) 0
Containers with opa_layer 7 36 2 (+1) 2 (+1) 0
Containers with scrolling 44 47 (+1) 12 (+1) 12 (+1) 0
Widgets demo 67 (+1) 42 15 15 0
All scenes avg. 24 38 6 6 0

Disclaimer: These benchmarks were run in an emulated environment using QEMU with instruction counting mode.
The timing values represent relative performance metrics within this specific virtualized setup and should
not be interpreted as absolute real-world performance measurements. Values are deterministic and useful for
comparing different LVGL features and configurations, but may not correlate directly with performance on
physical hardware. The measurements are intended for comparative analysis only.


🤖 This comment was automatically generated by a bot.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 6 files

@FASTSHIFT FASTSHIFT changed the title Add a 'polar chart' widget feat(widgets): add polar chart Nov 20, 2025
@escherstair
Copy link
Author

now the skeleton builds.
starting implementing the behavior of the polar chart widget is possible

@lizhaoming634
Copy link
Contributor

Perhaps you should add a new example code.

@escherstair
Copy link
Author

escherstair commented Nov 20, 2025

I'm not sure if the example code is the first task to do.
Basically I need an help understanding which "internal" functions are responsible to draw the several components of lv_chart (plot area, axes, legends, points, ...) becasue I need to modify them to behave as I need for a polar chart.
In this moment the PR only creates the functions that (I need) are necessary for the widget. But basically they behave like a chart.

I had added "polar chart" inside "chart" folder, but I wonder if a better approach would be having a separate "polarchart" folder.
I'll do this.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

7 issues found across 14 files (reviewed changes from recent commits).

Prompt for AI agents (all 7 issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="examples/widgets/polarchart/lv_example_polarchart_8.c">

<violation number="1" location="examples/widgets/polarchart/lv_example_polarchart_8.c:16">
The third gap point again writes to (s + 2) % p, leaving only two distinct points cleared instead of three; use a different offset for the third assignment so the gap actually spans three points.</violation>
</file>

<file name="examples/widgets/polarchart/index.rst">

<violation number="1" location="examples/widgets/polarchart/index.rst:3">
The underline under “Line Polarchart” is shorter than the title, which makes Sphinx fail with “Title underline too short.” Extend the underline to match the heading length.</violation>

<violation number="2" location="examples/widgets/polarchart/index.rst:16">
This section underline is shorter than its title, so Sphinx/docutils rejects the file. Make the underline at least as long as the heading text.</violation>

<violation number="3" location="examples/widgets/polarchart/index.rst:28">
The underline beneath “Scatter polarchart” is too short for the heading, breaking the RST structure. Extend it to at least the heading length.</violation>

<violation number="4" location="examples/widgets/polarchart/index.rst:34">
The underline below “Circular line polarchart with gap” is shorter than the title, which makes the RST invalid. Increase the underline length to match the heading.</violation>
</file>

<file name="tests/src/test_cases/xml/test_xml_polarchart.c">

<violation number="1" location="tests/src/test_cases/xml/test_xml_polarchart.c:32">
This test is supposed to build a polar chart but asks lv_xml_create for &quot;lv_chart&quot;, so the parser constructs a regular cartesian chart and later lv_polarchart_* calls operate on the wrong object type, causing LV_ASSERT failures.</violation>

<violation number="2" location="tests/src/test_cases/xml/test_xml_polarchart.c:41">
Axis attributes are routed through the regular chart parser (`lv_chart-axis`), which calls lv_chart_set_axis_* on the parent. A polar chart requires the `lv_polarchart-axis` tag so its own axis setters run; otherwise the XML attributes are ignored or trigger asserts.</violation>
</file>

Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 2 files (reviewed changes from recent commits).

Prompt for AI agents (all 1 issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="docs/src/details/widgets/polarchart.rst">

<violation number="1" location="docs/src/details/widgets/polarchart.rst:382">
The new include points to ../../examples/widgets/polarchart/index.rst, but that file doesn’t exist in the repo, so the documentation build will error.</violation>
</file>

Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR

Example
*******

.. include:: ../../examples/widgets/polarchart/index.rst
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new include points to ../../examples/widgets/polarchart/index.rst, but that file doesn’t exist in the repo, so the documentation build will error.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At docs/src/details/widgets/polarchart.rst, line 382:

<comment>The new include points to ../../examples/widgets/polarchart/index.rst, but that file doesn’t exist in the repo, so the documentation build will error.</comment>

<file context>
@@ -380,7 +379,7 @@ No *Keys* are processed by Chart Widgets.
 *******
 
-.. include:: ../../examples/widgets/chart/index.rst
+.. include:: ../../examples/widgets/polarchart/index.rst
 
 
</file context>
Fix with Cubic

@escherstair
Copy link
Author

Hi,

Thank you for this PR! Regarding tests, please see this.

Please also add a few examples similar to these. Having the example would make it much easier to try it out.

Finally we also need docs like this.

@kisvegabor I did it (a mock as a starting point for the implementation).
Can you have a double check?

@kisvegabor
Copy link
Member

Hey,
I've checked the examples and tests, but they look exactly like the normal chart. Please modify them to show how the polar chart is different from the normal.

@escherstair
Copy link
Author

Hey, I've checked the examples and tests, but they look exactly like the normal chart. Please modify them to show how the polar chart is different from the normal.

I wrote from the beginning that I only wrote mocks.
Because I don't understand how lvgl components draw themselves.
So, no idea on what to change to implement the polar chart.

Do you need me to change the png files in the tests to show the appearance of what I expect in the several tests?

@FASTSHIFT FASTSHIFT requested a review from Copilot November 27, 2025 11:07
Copilot finished reviewing on behalf of FASTSHIFT November 27, 2025 11:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new polar chart widget to LVGL, providing functionality to display data in polar coordinates with support for line and scatter chart types. The implementation includes comprehensive test coverage, XML parsing support, theme integrations, and multiple examples.

Key Changes

  • New polar chart widget implementation with API for series management, cursor support, and data visualization
  • XML parser support for declarative polar chart creation
  • Integration with all three existing themes (default, simple, mono)
  • Comprehensive test suite including unit tests, performance tests, and XML tests
  • Multiple usage examples demonstrating various polar chart features

Reviewed changes

Copilot reviewed 32 out of 38 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/widgets/polarchart/lv_polarchart.h Public API header defining polar chart types, functions for chart creation, series management, and data manipulation
src/widgets/polarchart/lv_polarchart_private.h Private header with internal data structures for polar chart, series, and cursor
src/xml/parsers/lv_xml_polarchart_parser.c XML parser implementation for polar chart widget and its sub-components
src/xml/parsers/lv_xml_polarchart_parser.h XML parser API declarations
src/xml/lv_xml.c Registration of polar chart XML parsers
src/themes/default/lv_theme_default.c Default theme styling for polar chart widget
src/themes/simple/lv_theme_simple.c Simple theme styling for polar chart widget
src/themes/mono/lv_theme_mono.c Monochrome theme styling for polar chart widget
src/lv_conf_internal.h Configuration macro for enabling polar chart widget
lv_conf_template.h Template configuration option for polar chart
lvgl.h Main header inclusion of polar chart public API
lvgl_private.h Private header inclusion for internal access
src/misc/lv_types.h Type definitions for polar chart structures
tests/src/test_cases/widgets/test_polarchart.c Comprehensive unit tests for polar chart functionality
tests/src/test_cases/xml/test_xml_polarchart.c XML parsing and rendering tests
tests/src/test_cases_perf/test_polarchart.c Performance benchmark tests
tests/src/lv_test_perf_conf.h Performance test configuration
examples/widgets/polarchart/*.c Example implementations demonstrating various polar chart features
examples/widgets/lv_example_widgets.h Example function declarations
docs/src/details/widgets/index.rst Documentation index entry
configs/ci/perf/lv_conf_perf64b.defaults CI performance test configuration
env_support/cmsis-pack/lv_conf_cmsis.h CMSIS pack configuration

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants