Are LVGL charts fully supported in EEZ Studio 0.20.0

Hi,

I am really delighted with EEZ Studio and I am developing on a Waveshare ESP32-S3-Touch-LCD-4.3.

My question is whether EEZ Studio is fully supporting LVGL charts right now.

As a reference, LVGL Labels can be assigned expressions which permit my application to present data from my code. This is under a Property category called Specific.

I am inferring that the Specific Property category is the means to associate application data to LVGL widgets under EEZ Studio.

The LVGL Chart widget is missing this property and is also missing all chart properties available to LVGL.

Can someone clarify if I am either:

  1. Missing these properties, or

  2. Is the LVGL Chart widget still under development?

Thanks
Chris

Hey Chris,
I think this is still lacking in 0.23.1. Unless of course I too am doing something wrong with the Chart widget.
Did you find any way to make it work?

Hi,

Yes, I had to effectively patch my code with LVGL chart code to present a chart.

Here is the code I wrote that gives me the chart I was seeking:

This goes into vars.h:

extern lv_coord_t chart_data[280];

screens.c:

{
                    // wave_chart
                    lv_obj_t *obj = lv_chart_create(parent_obj);
                    objects.wave_chart = obj;
                    lv_obj_set_pos(obj, 1, 117);
                    lv_obj_set_size(obj, 754, 300);
                    lv_chart_set_type(obj, LV_CHART_TYPE_BAR);
                    // Set the number of points for each series
                    lv_chart_set_point_count(obj, 280);
                    // Create series for the chart (typically one or more)
                    lv_chart_series_t * series1 = lv_chart_add_series(obj,  lv_palette_main(LV_PALETTE_RED),LV_CHART_AXIS_PRIMARY_Y);
                    lv_chart_set_ext_y_array(obj, series1, (lv_coord_t *)chart_data);
                    lv_chart_set_update_mode(obj, LV_CHART_UPDATE_MODE_SHIFT);
                    lv_chart_set_range(obj, LV_CHART_AXIS_PRIMARY_Y, 0, 280);
                }

I can put data into the chart with this function:

int set_chart_data(int chart_index, int value) {
    int index = 0;
    if(chart_index == 279) {
        for(int i = 1; i < 280; i++) {
            chart_data[i-1] = chart_data[i];
            chart_data[279] = (lv_coord_t)value;
            index = 279;
        }
    } else {
        chart_data[chart_index] = (lv_coord_t)value;
        index = chart_index + 1;
    }

    return index;
}