Line Graph Widget Documentation

Last modified by Microchip on 2024/07/12 14:08

Introduction

The Line Graph Widget is a graphical interface element designed to present data in a visually engaging manner, allowing users to easily discern patterns and trends.

This widget serves as an essential tool for data analysis, enabling both real-time and retrospective review of complex information through a simplified and intuitive visual representation.

This Line Graph Widget document covers the following topics:

  1. Creating and customizing Line Graph Widgets using Microchip Graphics Suite (MGS) Harmony Composer
  2. Line Graph Widget properties
  3. Handling Line Graph Widget properties and changing its data through application code
  4. Line Graph Widget example project
  5. APIs specific to Line Graph Widget

Before following this document, ensure that you are familiar with the process of designing with MGS Harmony Composer, generating code with MPLAB® Code Configurator (MCC) and debugging with MPLAB X IDE. To learn more about this, refer to the "Getting Started with Microchip Graphics Suite (MGS) Harmony" page.

Designing Line Graph Widget using MGS Harmony Composer

To add Line Graph widget to your design, follow the steps given below:

Select and drag the Line Graph from the Tool Box to your screen designer workspace as shown in the accompanying image:

Drag "Label" widget from Tool Box to your screen

Back to Top


To customize the line graph, select it on the screen designer or from the Screen Tree and modify its properties using the Object Editor:

Select Line Graph Widget and modify its properties

Click on the Press button next to Configure Data property:

Click the Press button to configure data series

Categories represent the X-axis data and Series are shown on the Y-axis. Once a category is added, a String needs to be selected for the label, by double-clicking the category or using the Edit button:

Configure graph data

Note: To learn how to import strings for your widget, please refer to the "Microchip Graphics Suite (MGS) Harmony Graphics Assets Guide" page.

Multiple Data Series can be used in the same time, and one can change their color by using Schemes Foreground color:

Multiple data series on the same graph

Back to Top


Managing Line Graph Widget Schemes

Schemes control the look and feel of a widget.

To learn more about Schemes, how to add a new scheme and apply it to the widget, refer to the "About the Schemes and Scheme Editor" page.

Below is an example color scheme and the resulting appearance of the Line Graph:

Line Graph Widget scheme example

The information about the Line Graph scheme adjustments and the example color scheme is summarized in the table below:

Line Graph scheme explained

Note: Understanding how the various segments of the color table influence the appearance of the list assists you in selecting the appropriate colors.

Back to Top

Line Graph Properties

You can set the following properties of the Line Graph using the Object Editor:

NameThis will be used to reference the Line Graph by the application. Example- Screen0_LineGraphWidget_0.
Tick LengthThis will be used to set the length of tick lines on the graph axis.
Fill Graph AreaThis will be set the graph area to be filled with Scheme Background color or leave the graph background same color as Scheme Base.
Value Axis Minimum ValueSets the minimum value on the Y Axis, it may also be a negative value.
Value Axis Maximum ValueSets the maximum value on the Y Axis.
Value Axis Tick IntervalSets the distance between ticks on the Y Axis.
Value Axis Show TicksIf checked, the ticks on Y Axis will be displayed.
Value Axis Tick PositionSets ticks position to inside, center of outside relative to Y Axis.
Value Axis Show Tick LabelsWhen checked, the tick labels will be shown.
Value Axis Show SubticksIf checked, the subticks will be shown.
Value Axis Subtick PositionSets subticks position to inside, center of outside relative to Y Axis.
Value Axis Show GridlinesWhen checked, the horizontal gridlines will be displayed.
Value Axis Label FontUsed to select which font will be used for displayed text.
Category Axis Show Category TicksWhen checked, the category ticks will be displayed on the X Axis.
Category Axis Show Category LabelsIf checked, the category labels will be displayed. For this labels, the font is the one that was set for the string asset that set for this category.
Category Axis Tick PositionSets ticks position to inside, center or outside relative to X Axis.
Configure DataUsed to configure the initial data for the Line Graph. It's optional to add initial data, as it can be added later in user code.
StackedWhen checked, the data series are displayed on top of one another. When you stack series in a line graph, each data point in a series is added to the sum of the corresponding data points in all the previous series.
Fill Series AreaIf checked, it will enable the fill area feature which makes the graph easier to interpret. The latest series will overwrite previous series area if values overlap.

Widget properties specific to Line Graph widget were discussed. For the properties common to all widgets, refer to the "Base Widget Documentation" page.

Back to Top

Managing Line Graph Widget through Programming

Once the graphical design is completed using MGS Harmony Composer, MCC generates the required code for all the widgets based on the properties set in the Object Editor. To learn more about the process flow between designing a UI and developing application code, refer to the "Designing an Application with Microchip Graphics Suite (MGS)" page.

Let us suppose that a Line Graph widget is created with the following properties in MGS Harmony Composer:

Line Graph example configuration

For the Line Graph widget with the properties shown in the figure above, MCC will automatically generate the following lines of code in  src\config\default\gfx\legato\generated\screen\le_gen_screen_Screen0.c:

  • A new line graph widget is created by the variable name Screen0_LineGraphWidget_0:

Screen0_LineGraphWidget_0 = leLineGraphWidget_New();

  • Its position is set to pixel location 100x100:

Screen0_LineGraphWidget_0->fn->setPosition(Screen0_LineGraphWidget_0, 100, 100);

  • Its size is set to 600x350:

Screen0_LineGraphWidget_0->fn->setSize(Screen0_LineGraphWidget_0, 600, 350);

  • If the scheme is changed from default to custom scheme, the following code is added:

Screen0_LineGraphWidget_0->fn->setScheme(Screen0_LineGraphWidget_0, &GraphScheme);

  • Set the widget background to be filled with the color specified by graph scheme:

Screen0_LineGraphWidget_0->fn->setBackgroundType(Screen0_LineGraphWidget_0, LE_WIDGET_BACKGROUND_FILL);

  • Set the tick length in number of pixels:

Screen0_LineGraphWidget_0->fn->setTickLength(Screen0_LineGraphWidget_0, 20);

  • Configure the Line Graph to fill the area beneath the series lines:

Screen0_LineGraphWidget_0->fn->setFillSeriesArea(Screen0_LineGraphWidget_0, LE_TRUE);

  • Set the minimum value on the Value Axis:

Screen0_LineGraphWidget_0->fn->setMinValue(Screen0_LineGraphWidget_0, LINE_GRAPH_AXIS_0, -30);

  • Set the maximumvalue on the Value Axis:

Screen0_LineGraphWidget_0->fn->setMaxValue(Screen0_LineGraphWidget_0, LINE_GRAPH_AXIS_0, 30);

  • Configure the ticks interval on Value Axis:

Screen0_LineGraphWidget_0->fn->setValueAxisTickInterval(Screen0_LineGraphWidget_0, LINE_GRAPH_AXIS_0, 5);

  • Sets ticks to not be visible on Value Axis:

Screen0_LineGraphWidget_0->fn->setValueAxisTicksVisible(Screen0_LineGraphWidget_0, LINE_GRAPH_AXIS_0, LE_FALSE);

  • Sets subticks to not be visible on Value Axis:

Screen0_LineGraphWidget_0->fn->setValueAxisSubticksVisible(Screen0_LineGraphWidget_0, LINE_GRAPH_AXIS_0, LE_FALSE);

  • Configure the subticks position relative to the Value Axis to outside:

Screen0_LineGraphWidget_0->fn->setValueAxisSubticksPosition(Screen0_LineGraphWidget_0, LINE_GRAPH_AXIS_0, LINE_GRAPH_TICK_OUT);

  • Set the font used for ticks label on Value Axis:

Screen0_LineGraphWidget_0->fn->setTicksLabelFont(Screen0_LineGraphWidget_0, (leFont*)&Font0);

  • Add a new category, which will automatically match it with an ID. The function also returns the ID:

Screen0_LineGraphWidget_0->fn->addCategory(Screen0_LineGraphWidget_0);

  • Set the string that will be used for a category identified by its ID:

Screen0_LineGraphWidget_0->fn->setCategoryString(Screen0_LineGraphWidget_0, 0, (leString*)&string_Timeline1);

  • Add a new series, which will automatically match it with an ID. The function also returns the ID:

Screen0_LineGraphWidget_0->fn->addSeries(Screen0_LineGraphWidget_0);

  • Set the scheme for a specific series identified by its ID:

Screen0_LineGraphWidget_0->fn->setSeriesScheme(Screen0_LineGraphWidget_0, 0, &RedScheme);

  • Add data a specific series identified by its ID:

Screen0_LineGraphWidget_0->fn->addDataToSeries(Screen0_LineGraphWidget_0, 0, 10);

  • Add data a specific series identified by its ID:

Screen0_LineGraphWidget_0->fn->addDataToSeries(Screen0_LineGraphWidget_0, 0, 10);

  • Finally, the label is added to the screen:

->fn->addChild(root0, (leWidget*)Screen0_LineGraphWidget_0);

Back to Top

Application Code

The default code generated by MCC sets the initial state of the widget. The property or behavior of the widgets can be changed by using the APIs discussed above, in the application code. Additional application code discussion related to Line Graph widget is presented below.

Here is an example of clearing the previous data that Line Graph Widget was showing, setting new minimum and maximum value, adding a new category and series to that category:

Screen0_LineGraphWidget_0->fn->clear(Screen0_LineGraphWidget_0);

Screen0_LineGraphWidget_0->fn->setMinValue(Screen0_LineGraphWidget_0, LINE_GRAPH_AXIS_0, 0);
Screen0_LineGraphWidget_0->fn->setMaxValue(Screen0_LineGraphWidget_0, LINE_GRAPH_AXIS_0, 100);

Screen0_LineGraphWidget_0->fn->addCategory(Screen0_LineGraphWidget_0);
Screen0_LineGraphWidget_0->fn->setCategoryString(Screen0_LineGraphWidget_0, 0, (leString*)&tm_st0);

Screen0_LineGraphWidget_0->fn->addSeries(Screen0_LineGraphWidget_0);
Screen0_LineGraphWidget_0->fn->addDataToSeries(Screen0_LineGraphWidget_0, 0, 90);

Back to Top

Line Graph Widget Example Project

An example project for Line Graph Widget is provided.

In this example we show:

  1. How to create a Line Graph Widget
  2. How to clear the data it had and add new category and series
  3. How to simulate dynamic data

Back to Top

MGS Simulator Output

Line Graph Widget Example

The callback functions for handling the Button events and Line Graph updates are defined in the app.c file. In this example dynamic strings were used for Line Graph Category labels.

As a best practice, changes to the widget are done in the main loop based on the variables that are changed in the timer callback, not in the callback directly.

The system timer callback and the code that changes the Label Widget can be found in the app.c file.

  •   System timer callback:
void Timer_Callback ( uintptr_t context )
{
   if (generate_random == 1)
    {
       int pos = 0;
       for (pos = 0; pos < 4; pos++)
        {
            timestamp[pos] = timestamp[pos+1];
            values[pos] = values[pos+1];
        }
        timestamp[4]++;
        values[4] = (rand() % 60) - 30;
        update_graph = 1;
    }
}
  • Pressing ButtonWidget_0 will start simulation of a dynamic graph by updating the Category labels and Series data each second. Firstly clear the already existing data, update the minimum and maximum values and populate the graph data. Complete callback code can be found in the app.c file:
Screen0_LineGraphWidget_0->fn->clear(Screen0_LineGraphWidget_0);
Screen0_LineGraphWidget_0->fn->setMinValue(Screen0_LineGraphWidget_0, LINE_GRAPH_AXIS_0, -30);
Screen0_LineGraphWidget_0->fn->setMaxValue(Screen0_LineGraphWidget_0, LINE_GRAPH_AXIS_0, 30);

sprintf(tm_st0_char, "%lu", timestamp[0]);
tm_st0.fn->setFromCStr(&tm_st0, tm_st0_char);    
Screen0_LineGraphWidget_0->fn->addCategory(Screen0_LineGraphWidget_0);
Screen0_LineGraphWidget_0->fn->setCategoryString(Screen0_LineGraphWidget_0, 0, (leString*)&tm_st0);

Screen0_LineGraphWidget_0->fn->addSeries(Screen0_LineGraphWidget_0);
Screen0_LineGraphWidget_0->fn->setSeriesScheme(Screen0_LineGraphWidget_0, 0, &RedScheme);
for (int i = 0; i < 5; i++)
    Screen0_LineGraphWidget_0->fn->addDataToSeries(Screen0_LineGraphWidget_0, 0, values[i]);
               
Screen0_LineGraphWidget_0->fn->invalidate(Screen0_LineGraphWidget_0);
  • Pressing ButtonWidget_1 will show static data in the Line Graph. Firstly clear the already existing data, update the minimum and maximum values, set the fill series area feature of the graph and populate the graph data. Complete callback code can be found in the app.c file:
Screen0_LineGraphWidget_0->fn->clear(Screen0_LineGraphWidget_0);
Screen0_LineGraphWidget_0->fn->setMinValue(Screen0_LineGraphWidget_0, LINE_GRAPH_AXIS_0, 0);
Screen0_LineGraphWidget_0->fn->setMaxValue(Screen0_LineGraphWidget_0, LINE_GRAPH_AXIS_0, 100);
Screen0_LineGraphWidget_0->fn->setFillSeriesArea(Screen0_LineGraphWidget_0, LE_TRUE);

sprintf(tm_st0_char, "Mon");
tm_st0.fn->setFromCStr(&tm_st0, tm_st0_char);
Screen0_LineGraphWidget_0->fn->addCategory(Screen0_LineGraphWidget_0);
Screen0_LineGraphWidget_0->fn->setCategoryString(Screen0_LineGraphWidget_0, 0, (leString*)&tm_st0);

Screen0_LineGraphWidget_0->fn->addSeries(Screen0_LineGraphWidget_0);  
Screen0_LineGraphWidget_0->fn->setSeriesScheme(Screen0_LineGraphWidget_0, 0, &RedScheme);
Screen0_LineGraphWidget_0->fn->addDataToSeries(Screen0_LineGraphWidget_0, 0, 90);

Screen0_LineGraphWidget_0->fn->invalidate(Screen0_LineGraphWidget_0);

Back to Top

Line Graph Widget APIs Description

This section describes the APIs specific to Line Graph Widget. For a description of APIs common to all widgets, refer to the "Base Widget Documentation" page.

getTickLength()

uint32_t getTickLength(const leLineGraphWidget* _this)

Gets the tick length.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on

Returns the length value.

setTickLength()

leResult setTickLength(leLineGraphWidget* _this, uint32_t len)

Sets the tick length.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
uint32_tlenTick length value

Returns LE_SUCCESS or LE_FAILURE.

getStacked()

leBool getStacked(const leLineGraphWidget* _this)

Gets the stacked setting.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on

Returns the setting value.

setStacked()

leResult setStacked(leLineGraphWidget* _this, leBool stk)

Sets the stacked status.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
leBoolstkThe stacked status

Returns LE_SUCCESS or LE_FAILURE.

getMaxValue()

int32_t getMaxValue(const leLineGraphWidget* _this, leLineGraphValueAxis axis)

Gets the maximum value from Value Axis.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
leLineGraphValueAxisaxisWhich axis to be checked. This parameter is not used

Returns the maximum value.

setMaxValue()

leResult setMaxValue(leLineGraphWidget* _this, leLineGraphValueAxis axis, int32_t max)

Sets the maximum value.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
leLineGraphValueAxisaxisWhich axis to be checked. This parameter is not used
int32_tmaxThe new value to be set as maximum.

Returns LE_SUCCESS or LE_FAILURE.

getMinValue()

int32_t getMinValue(const leLineGraphWidget* _this, leLineGraphValueAxis axis)

Gets the minimum value from Value Axis.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
leLineGraphValueAxisaxisWhich axis to be checked. This parameter is not used

Returns the minimum value.

setMinValue()

leResult setMinValue(leLineGraphWidget* _this, leLineGraphValueAxis axis, int32_t min)

Sets the minimum value.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
leLineGraphValueAxisaxisWhich axis to be checked. This parameter is not used
int32_tminThe new value to be set as minimum.

Returns LE_SUCCESS or LE_FAILURE.

getValueAxisLabelsVisible()

leBool getValueAxisLabelsVisible(const leLineGraphWidget* _this, leLineGraphValueAxis axis)

Gets the visible Value Axis label setting.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
leLineGraphValueAxisaxisWhich axis to be checked. This parameter is not used

Returns the setting value.

setValueAxisLabelsVisible()

leResult setValueAxisLabelsVisible(leLineGraphWidget* _this, leLineGraphValueAxis axis, leBool vis)

Sets the visibility of the Value Axis labels.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
leLineGraphValueAxisaxisWhich axis to be checked. This parameter is not used
leBoolvisThe new label visibility setting

Returns LE_SUCCESS or LE_FAILURE.

getFillGraphArea()

leBool getFillGraphArea(const leLineGraphWidget* _this)

Gets the graph fill setting.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on

Returns the setting value.

setFillGraphArea()

leResult setFillGraphArea(leLineGraphWidget* _this, leBool fill)

Sets the graph fill setting.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
leBoolfillThe new fill setting

Returns LE_SUCCESS or LE_FAILURE.

getFillSeriesArea()

leBool getFillSeriesArea(const leLineGraphWidget* _this)

Gets the fill series area setting.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on

Returns the setting value.

setFillSeriesArea()

leResult setFillSeriesArea(leLineGraphWidget* _this, leBool fill)

Sets the fill series area setting.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
leBoolfillThe new fill setting

Returns LE_SUCCESS or LE_FAILURE.

getGridLinesVisible()

leBool getGridLinesVisible(const leLineGraphWidget* _this, leLineGraphValueAxis axis)

Gets the visible grid lines setting.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
leLineGraphValueAxisaxisWhich axis to be checked. This parameter is not used

Returns the setting value.

setGridLinesVisible()

leResult setGridLinesVisible(leLineGraphWidget* _this, leLineGraphValueAxis axis, leBool vis)

Sets the visibility of the grid lines.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
leLineGraphValueAxisaxisWhich axis to be checked. This parameter is not used
leBoolvisThe new visibility setting

Returns LE_SUCCESS or LE_FAILURE.

getValueAxisTicksVisible()

leBool getValueAxisTicksVisible(const leLineGraphWidget* _this, leLineGraphValueAxis axis)

Gets the visible value ticks setting.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
leLineGraphValueAxisaxisWhich axis to be checked. This parameter is not used

Returns the setting value.

setValueAxisTicksVisible()

leResult setValueAxisTicksVisible(leLineGraphWidget* _this, leLineGraphValueAxis axis, leBool vis)

Sets the visibility of the value axis ticks.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
leLineGraphValueAxisaxisWhich axis to be checked. This parameter is not used
leBoolvisThe new visibility setting

Returns LE_SUCCESS or LE_FAILURE.

getValueAxisTickInterval()

uint32_t getValueAxisTickInterval(const leLineGraphWidget* _this, leLineGraphValueAxis axis)

Gets the value axis tick interval setting.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
leLineGraphValueAxisaxisWhich axis to be checked. This parameter is not used

Returns the tick interval value.

setValueAxisTickInterval()

leResult setValueAxisTickInterval(leLineGraphWidget* _this, leLineGraphValueAxis axis, uint32_t itv)

Sets the inverval of the value axis ticks.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
leLineGraphValueAxisaxisWhich axis to be checked. This parameter is not used
uint32_titvThe new interval value

Returns LE_SUCCESS or LE_FAILURE.

getValueAxisSubticksVisible()

leBool getValueAxisSubticksVisible(const leLineGraphWidget* _this, leLineGraphValueAxis axis)

Gets the visible value subticks setting.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
leLineGraphValueAxisaxisWhich axis to be checked. This parameter is not used

Returns the setting value.

setValueAxisSubticksVisible()

leResult setValueAxisSubticksVisible(leLineGraphWidget* _this, leLineGraphValueAxis axis, leBool vis)

Sets the visibility of the value axis subticks.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
leLineGraphValueAxisaxisWhich axis to be checked. This parameter is not used
leBoolvisThe new visibility setting

Returns LE_SUCCESS or LE_FAILURE.

getValueAxisSubtickInterval()

uint32_t getValueAxisSubtickInterval(const leLineGraphWidget* _this, leLineGraphValueAxis axis)

Gets the value axis subticks interval setting.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
leLineGraphValueAxisaxisWhich axis to be checked. This parameter is not used

Returns the subticks interval value.

setValueAxisSubtickInterval()

leResult setValueAxisSubticksInterval(leLineGraphWidget* _this, leLineGraphValueAxis axis, uint32_t itv)

Sets the inverval of the value axis subticks.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
leLineGraphValueAxisaxisWhich axis to be checked. This parameter is not used
uint32_titvThe new interval value

Returns LE_SUCCESS or LE_FAILURE.

getCategoryAxisTicksVisible()

leBool getCategoryAxisTicksVisible(const leLineGraphWidget* _this)

Gets the category axis ticks visible setting.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on

Returns the setting value.

setCategoryAxisTicksVisible()

leResult setCategoryAxisTicksVisible(leLineGraphWidget* _this, leBool vis)

Sets the category axis ticks visible setting.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
leBoolvisThe new visibility setting

Returns LE_SUCCESS or LE_FAILURE.

addCategory()

int32_t addCategory(leLineGraphWidget* _this)

Adds a data category.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on

Returns the category ID.

getCategoryString()

leString* getCategoryString(const leLineGraphWidget* _this, int32_t id)

Gets the string currently assigned to a category.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
int32_tidID of the category that should be checked

Returns string pointer.

setCategoryString()

leResult setCategoryString(leLineGraphWidget* _this, int32_t id, const leString* str)

Sets the category axis ticks visible setting.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
int32_tidID of the category that should be modified
const leString*strPointer to the string that should be shown on the category label

Returns LE_SUCCESS or LE_FAILURE.

addSeries()

int32_t addSeries(leLineGraphWidget* _this)

Adds a data series to the graph.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on

Returns the series ID.

addDataToSeries()

int32_t addDataToSeries(leLineGraphWidget* _this, int32_t seriesID, int32_t value)

Adds data to an existing series.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
int32_tseriesIDID of the series that should be used
int32_tvalueValue that will be added in the series

Returns the ID of the new value.

setDataInSeries()

leResult setDataInSeries(leLineGraphWidget* _this, int32_t seriesID, int32_t index, int32_t value)

Sets a new value to an already existing data series.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
int32_tseriesIDID of the series that should be used
int32_tindexIndex of the value that should be modified
int32_tvalueNew value that will be used

Returns LE_SUCCESS or LE_FAILURE.

getSeriesScheme()

leScheme* getSeriesScheme(const leLineGraphWidget* _this, int32_t seriesID)

Gets the scheme for a data series.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
int32_tseriesIDID of the series that should be checked

Returns scheme pointer.

setSeriesScheme()

leResult setSeriesScheme(leLineGraphWidget* _this, int32_t seriesID, const leScheme* scheme)

Sets the data series scheme.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
int32_tseriesIDID of the series that should be modified
const leScheme*schmPointer to the scheme that should be used

Returns LE_SUCCESS or LE_FAILURE.

getSeriesFillPoints()

leBool getSeriesFillPoints(const leLineGraphWidget* _this, int32_t seriesID)

Gets the series fill point setting.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
int32_tseriesIDID of the series that should be checked

Returns the setting value.

setSeriesFillPoints()

leResult setSeriesFillPoints(leLineGraphWidget* _this, int32_t seriesID, leBool fill)

Sets the data series scheme.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
int32_tseriesIDID of the series that should be modified
leBoolfillStatus that will be applied to fill setting

Returns LE_SUCCESS or LE_FAILURE.

getSeriesLinesVisible()

leBool getSeriesLinesVisible(const leLineGraphWidget* _this, int32_t seriesID)

Gets the series lines visible setting.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
int32_tseriesIDID of the series that should be checked

Returns the setting value.

setSeriesLinesVisible()

leResult setSeriesLinesVisible(leLineGraphWidget* _this, int32_t seriesID, leBool visible)

Sets the series lines visible setting.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
int32_tseriesIDID of the series that should be modified
leBoolvisibleSets if the lines will be visible or not

Returns LE_SUCCESS or LE_FAILURE.

getSeriesPointType()

leLineGraphDataPointType getSeriesPointType(const leLineGraphWidget* _this, int32_t seriesID)

Gets the series point type setting.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
int32_tseriesIDID of the series that should be checked

Returns the setting value.

setSeriesPointType()

leResult setSeriesPointType(leLineGraphWidget* _this, int32_t seriesID, leLineGraphDataPointType type)

Sets the series point type setting.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
int32_tseriesIDID of the series that should be modified
leLineGraphDataPointTypetypeStatus that will be applied to point type setting (LINE_GRAPH_DATA_POINT_NONE, LINE_GRAPH_DATA_POINT_CIRCLE or LINE_GRAPH_DATA_POINT_SQUARE)

Returns LE_SUCCESS or LE_FAILURE.

getSeriesPointSize()

uint32_t getSeriesPointSize(const leLineGraphWidget* _this, int32_t seriesID)

Gets the series point size.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
int32_tseriesIDID of the series that should be checked

Returns the series point size value.

setSeriesPointSize()

leResult setSeriesPointSize(leLineGraphWidget* _this, int32_t seriesID, uint32_t size)

Sets the series point type setting.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
int32_tseriesIDID of the series that should be modified
uint32_tsizeNew size for the series points

Returns LE_SUCCESS or LE_FAILURE.

clear()

leResult clear(leLineGraphWidget* _this)

Clears all graph data.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on

Returns LE_SUCCESS or LE_FAILURE.

setTicksLabelFont()

leResult setTicksLabelFont(leLineGraphWidget* _this, const leFont* font)

Sets the series point type setting.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
const leFont*fontThe font that should be used

Returns LE_SUCCESS or LE_FAILURE.

getCategoryAxisLabelsVisible()

leBool getCategoryAxisLabelsVisible(const leLineGraphWidget* _this)

Gets the category axis labels visible setting.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on

Returns the setting.

setCategoryAxisLabelsVisible()

leResult setCategoryAxisLabelsVisible(leLineGraphWidget* _this, leBool visible)

Sets the category axis labels visible setting.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
leBoolvisibleSets the labels visibility setting

Returns LE_SUCCESS or LE_FAILURE.

getValueAxisTicksPosition()

leLineGraphTickPosition getValueAxisTicksPosition(const leLineGraphWidget* _this, leLineGraphValueAxis axis)

Gets the value axis ticks position.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
leLineGraphValueAxisaxisWhich axis to be checked. This parameter is not used

Returns the value axis ticks position.

setValueAxisTicksPosition()

leResult setValueAxisTicksPosition(leLineGraphWidget* _this, leLineGraphValueAxis axis, leLineGraphTickPosition position)

Sets the value axis ticks position.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
leLineGraphValueAxisaxisWhich axis to be checked. This parameter is not used
leLineGraphTickPositionpositionSets the position to LINE_GRAPH_TICK_IN, LINE_GRAPH_TICK_OUT or LINE_GRAPH_TICK_CENTER

Returns LE_SUCCESS or LE_FAILURE.

getValueAxisSubticksPosition()

leLineGraphTickPosition getValueAxisSubticksPosition(const leLineGraphWidget* _this, leLineGraphValueAxis axis)

Gets the value axis subticks position.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
leLineGraphValueAxisaxisWhich axis to be checked. This parameter is not used

Returns the value axis subticks position.

setValueAxisSubticksPosition()

leResult setValueAxisSubticksPosition(leLineGraphWidget* _this, leLineGraphValueAxis axis, leLineGraphTickPosition position)

Sets the value axis subticks position.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
leLineGraphValueAxisaxisWhich axis to be checked. This parameter is not used
leLineGraphTickPositionpositionSets the position to LINE_GRAPH_TICK_IN, LINE_GRAPH_TICK_OUT or LINE_GRAPH_TICK_CENTER

Returns LE_SUCCESS or LE_FAILURE.

getCategoryAxisTicksPosition()

leLineGraphTickPosition getCategoryAxisTicksPosition(const leLineGraphWidget* _this)

Gets the category axis ticks position.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on

Returns the category axis ticks position.

setCategoryAxisTicksPosition()

leResult setCategoryAxisTicksPosition(leLineGraphWidget* _this, leLineGraphTickPosition position)

Sets the category axis ticks position.

Parameters

leLineGraphWidget*_thisLine Graph widget pointer to operate on
leLineGraphTickPositionpositionSets the position to LINE_GRAPH_TICK_IN, LINE_GRAPH_TICK_OUT or LINE_GRAPH_TICK_CENTER

Returns LE_SUCCESS or LE_FAILURE.

Back to Top