Bar Graph Widget Documentation

Last modified by Microchip on 2024/07/29 16:15

Introduction

Bar Graph widgets are interactive elements within a Graphical User Interface (GUI) that enables users to display specific numerical data on a touchscreen display. When implemented, Bar Graph widgets will display inputted data categories such as quarterly numbers or varying masses of objects. They play a crucial role in providing an interactive user experience as they can be integrated with other widgets on the Microchip Graphics Suite (MGS) Harmony Composer to create a customizable and specialized user experience.

This Bar Graph widget page covers the following topics:

  1. Creating and customizing Bar Graph widgets using Microchip Graphics Suite (MGS) Harmony Composer
  2. Bar Graph widget properties
  3. Handling Bar Graph widget properties and events through application code
  4. Bar Graph widget example project
  5. Application Program Interfaces (APIs) specific to Bar Graph widgets

Before following this tutorial, 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 Bar Graph Widget Using MGS Harmony Composer

Follow these steps to add a Bar Graph widget to your design:

Select and drag the BarGraphWidget from the Tool Box to your screen designer workspace as shown in Figure 1.

BarGraphWidget

Figure 1: Adding Bar Graph Widget to the design

Back to Top


To customize the bar graph, select it on the screen designer and modify its properties using the Object Editor.

You can add data entries to your bar graph using the Configure Data property. Let us suppose you want to create a bar graph as shown in Figure 2:

create a bar graph

Figure 2: Bar Graph with 4 data categories and 3 data series

The bar graph shown in Figure 2 has four data categories along the X -axis. For each category, there are three data series.

To configure bar graph data, click the Press button next to the Configure Data property as shown in Figure 3.

configure bar graph data

Figure 3: Press button to launch Configure Graph Data

Back to Top


Then from the Configure Graph Data window as shown in Figure 4, follow these steps:

To add a new Data Category (refer Figure 2) for the X-axis, click on the + icon.
Double-click on the new label to launch the Select String window and choose a label from the list. Note that labels must be added through the String Manager prior to this step.
If you have multiple Data Series (refer Figure 2) in your bar graph, click on the + icon to add a new Data Series.
Double-click on the new Data Series and provide a unique Name for the series.

In the table highlighted in green in Figure 4, double-click on the required data and enter the desired data.

Configure Graph Data

Figure 4: Configure Graph Data

Information

Note: To learn how to set strings for the widget, please refer to the "Using Strings in Microchip Graphics Suite (MGS)" page.

To set the stacked property on the bar graph, select the option from the Object Editor as shown in Figure 5:

Stacked property is selected

Figure 5: Stacked property is selected

Unstacked

Figure 6: Stacked property is not selected

Back to Top


Managing Bar Graph Widget Schemes

Schemes control the look and feel of a widget.

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

To learn how to set the scheme for a bar graph, click on the  question Mark button next to the Scheme property editor from the Object Editor.

SchemeHelper

Figure 7: Launching Bar Graph widget scheme helper

This launches the Bar Graph Scheme Helper window containing tips on how different sections of the scheme color table manipulate various elements of the widget.

Bar Graph scheme helper

Figure 8: Bar Graph scheme helper

The following is an example color scheme and the resulting bar graph appearance. Note that if your bar graph has more than one Data Series, it is helpful to assign each series with a unique color scheme to easily distinguish between them. 

Scheme Effect

Figure 9: Bar Graph scheme effect

The information from the button scheme helper and the example color scheme used is summarized in the following table.

Color Table

Table 1: Bar Graph Color Table example

Understanding how the various segments of the color table influence the appearance of the bar graph, assists you in selecting the appropriate colors.

Back to Top

Bar Graph Widget Properties

You can set the following properties of the bar graph using the Object Editor:

Name

This will be used to reference the bar graph by the application (example- Screen0_Bar GraphWidget_0).
Numerical Graph
Tick LengthThe length of axis ticks in pixels.
Fill Graph AreaFill the graph area. 

Value Axis

 

This will be used to control the dimensions of the bar graph with the max, min, and tick values.

Minimum ValueThe minimum value of the axis.
Maximum ValueThe maximum value of the axis.
Tick IntervalThe intervals between major ticks.
Show TicksShow/Hide the major ticks.
Tick PositionThe tick position (Inside, Center, Outside).
Show Tick LabelsShow/Hide the tick labels.
Show SubticksShow/Hide the minor ticks.
Subtick PositionThe subtick position (Inside, Center, Outside).
Show GridlinesShow/Hide the gridlines.
Label FontThe tick value label font. Ensure the selected font contains the appropriate Latin numerical glyphs.
Category Axis Show Category Ticks

If checked, the category labels will be displayed. 

Show Category TicksShow/Hide the category separator ticks.
Show Category LabelsShow/Hide the tick labels.
Tick PositionThe tick position (Inside, Center, Outside).
Configure DatePress button to launch the Graph Configuration Dialog.

Bar Graph - Stacked

When it is checked, the second data series will be stacked on top of the first. If unchecked, each data series will be displayed as a separate bar. Refer to Designing Bar Graph Widget Using MGS Harmony Composer Step 2.

Figure 10,11,12 show the detailed information for the Bar Graph Value Axis.

Value Axis

Figure 10: Value Axis configuration

Value Axis

Figure 11: Value Axis configuration for major and sub tick position

Value Axis

Figure 12: Value Axis configuration for gridlines

Widget properties specific to BarGraphWidget were discussed. For the properties common to all widgets, refer to the "Base Widget Documentation" section

Back to Top

Managing Bar 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 new Bar Graph widget is created with the following properties in MGS Harmony Composer:

Bargraph Properties

Figure 13: Bar Graph Widget properties

For the Bar 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 Bar Graph widget is created by the variable name Screen0_BarGraphWidget_0

 Screen0_Bar GraphWidget_0 = leBar GraphWidget_New();

  • Its position is set to pixel location 384x86

 Screen0_Bar GraphWidget_0 ->fn->setPosition(Screen0_BarGraphWidget_0, 384, 86);

  • The Bar Graph size is set to have a width of 350 pixels and a height of 327 pixels

Screen0_Bar GraphWidget_0 ->fn->setSize(Screen0_BarGraphWidget_0, 350, 327);

  • If the scheme is altered, the following code is implemented:

Screen0_Bar GraphWidget_0 ->setScheme(Screen0_BarGraphWidget_0, &Scheme);

  • Sets the minimum value on the Y-axis

Screen0_Bar GraphWidget_0 ->fn->setMinValue(Screen0_BarGraphWidget_0, 0);

  • Sets the maximum value on the Y-axis

Screen0_Bar GraphWidget_0 ->fn->setMaxValue(Screen0_BarGraphWidget_0, 100);

  • Sets the tick interval on the Y-axis

Screen0_Bar GraphWidget_0 ->fn->setValueAxisTickInterval(Screen0_BarGraphWidget, BAR_GRAPH_AXIS_0, 10);

  • Its graph area value is set to none so that the background of the bar graph isn't filled with any color

Screen0_Bar GraphWidget_0 ->fn->setFillGraphArea(Screen0_BarGraphWidget_0, LE_FALSE);

  • The Bar Graph is set to have a line border. However, you could have no border or a bevel border

Screen0_Bar GraphWidget_0 ->fn->setBorderType(Screen0_BarGraphWidget_0, LE_WIDGET_BORDER_LINE);

  • Finally, the Bar Graph is added to the screen

root0 ->fn->addChild(root0, (leWidget*)Screen0_BarGraphWidget_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 the Bar Graph widget is presented below.

Here is an example of how other MGS Widgets affect Bar Graph properties (in app.c):

/* When the checkbox widget is in a checked state, the Screen0_BarGraphWidget_0 bargraph
 * widget changes its max value to 20, tick length to 5, sets the value axis ticks property

to visible, and changes the data in the Widget based off data obtained from an array */
void event_Screen0_CheckBoxWidget_0_OnChecked(leCheckBoxWidget* btn)
{
    Screen0_BarGraphWidget_0->fn->setMaxValue(Screen0_BarGraphWidget_0, BAR_GRAPH_AXIS_0, 20);
    Screen0_BarGraphWidget_0->fn->setTickLength(Screen0_BarGraphWidget_0, 5);
    Screen0_BarGraphWidget_0->fn->setValueAxisTicksVisible(Screen0_BarGraphWidget_0, BAR_GRAPH_AXIS_0, true);
    Screen0_BarGraphWidget_0->fn->setDataInSeries(Screen0_BarGraphWidget_0, 0, 0, averageWeightOz[0] / 16);
    Screen0_BarGraphWidget_0->fn->setDataInSeries(Screen0_BarGraphWidget_0, 0, 1, averageWeightOz[1] / 16);
    Screen0_BarGraphWidget_0->fn->setDataInSeries(Screen0_BarGraphWidget_0, 0, 2, averageWeightOz[2] / 16);

}

Back to Top

Bar Graph Widget Example Project

Refer to the Bar Graph widget example project in GitHub.

In this example, we show:

  1. How to create a Bar Graph Widget 
  2. How to alter the data through other widget interactions
  3. How to alter the scaling of the Bar Graph Widget

Back to Top

MGS Simulator Output

Bargraph Widget Example using checkboxes

The callback functions for handling the Checkbox events and Bar Graph updates are defined in the app.c file. In this example, dynamic strings were used for Bar 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 code that changes the Bar Graph widget can be found in the app.c file.

  • Upon checking CheckBoxWidget_0 or CheckBoxWidget_1, the unit of the input data will be changed, and the bar graph will be updated accordingly.
const int initialFruit[] = {54, 34, 95};
const float averageWeightOz[] = {297.0, 142.8, 16.15};
bool convertionZero = false;
bool convertionOne = false;
void event_Screen0_CheckBoxWidget_0_OnChecked(leCheckBoxWidget* btn)
{
    convertionZero = true;
   if(convertionOne)
    {
        Screen0_CheckBoxWidget_1->fn->setChecked(Screen0_CheckBoxWidget_1, LE_FALSE);
    }
    Screen0_BarGraphWidget_0->fn->setMaxValue(Screen0_BarGraphWidget_0, BAR_GRAPH_AXIS_0, 20);
    Screen0_BarGraphWidget_0->fn->setTickLength(Screen0_BarGraphWidget_0, 5);
    Screen0_BarGraphWidget_0->fn->setValueAxisTicksVisible(Screen0_BarGraphWidget_0, BAR_GRAPH_AXIS_0, true);
    Screen0_BarGraphWidget_0->fn->setDataInSeries(Screen0_BarGraphWidget_0, 0, 0, averageWeightOz[0] / 16);
    Screen0_BarGraphWidget_0->fn->setDataInSeries(Screen0_BarGraphWidget_0, 0, 1, averageWeightOz[1] / 16);
    Screen0_BarGraphWidget_0->fn->setDataInSeries(Screen0_BarGraphWidget_0, 0, 2, averageWeightOz[2] / 16);
}
  • If both the checkboxes are unchecked, the bar graph reverts to default data.
void event_Screen0_CheckBoxWidget_0_OnUnchecked(leCheckBoxWidget* btn)
{
    convertionZero = false;
   if( !(convertionZero) && !(convertionOne))
    {
        Screen0_BarGraphWidget_0->fn->setMaxValue(Screen0_BarGraphWidget_0, BAR_GRAPH_AXIS_0, 100);
        Screen0_BarGraphWidget_0->fn->setValueAxisTicksVisible(Screen0_BarGraphWidget_0, BAR_GRAPH_AXIS_0, true);
        Screen0_BarGraphWidget_0->fn->setValueAxisTicksInterval(Screen0_BarGraphWidget_0, BAR_GRAPH_AXIS_0, 10);
        Screen0_BarGraphWidget_0->fn->setDataInSeries(Screen0_BarGraphWidget_0, 0, 0, initialFruit[0]);
        Screen0_BarGraphWidget_0->fn->setDataInSeries(Screen0_BarGraphWidget_0, 0, 1, initialFruit[1]);
        Screen0_BarGraphWidget_0->fn->setDataInSeries(Screen0_BarGraphWidget_0, 0, 2, initialFruit[2]);
    }
}

Back to Top

Bar Graph Widget APIs Description

This section describes the APIs specific to the Bar Graph widget. For a description of APIs common to all widgets, refer to the "Widget APIs Description" section.

getTickLength()

uint32_t getTickLength(const leBarGraphWidget* _this);
  • Gets the tick length

Parameters

leBarGraphWidget*_thisBar Graph widget pointer to operate on
  • Returns the tick length value

setTickLength()

leResult setTickLength(leBarGraphWidget* _this, uint32_t len);
  • Sets the tick length

Parameters

leBarGraphWidget*_thisBar Graph widget pointer to operate on
uint32_tlenTick length value
  • Returns LE_SUCCESS or LE_FAILURE

getMinValue()

int32_t getMinValue(const leBarGraphWidget* _this, leBarGraphValueAxis axis);
  • Gets the minimum value from the Value Axis

Parameters

leBarGraphWidget*_thisBar Graph widget pointer to operate on
leBarGraphValueAxisaxisValue axis to be checked
  • Returns the minimum value

setMinValue()

leResult setMinValue(leBarGraphWidget* _this, leBarGraphValueAxis axis, int32_t min);
  • Sets the minimum value

Parameters

leBarGraphWidget*_thisBar Graph widget pointer to operate on
leBarGraphValueAxisaxisValue axis to be checked
int32_tminThe new value set as minimum
  • Returns LE_SUCCESS or LE_FAILURE

getMaxValue()

int32_t getMaxValue(const leBarGraphWidget* _this, leBarGraphValueAxis axis);
  • Gets the maximum value from the Value Axis

Parameters

leBarhWidget*_thisBar Graph widget pointer to operate on
leBarGraphValueAxisaxisValue axis to be checked
  • Returns the maximum value

setMaxValue()

leResult setMaxValue(leBarGraphWidget* _this, leBarGraphValueAxis axis, int32_t max);
  • Sets the maximum value

Parameters

leBarGraphWidget*_thisBar Graph widget pointer to operate on
leBarGraphValueAxisaxisValue axis to be checked
int32_tmaxThe new maximum value
  • Returns LE_SUCCESS or LE_FAILURE

getValueAxisLabelsVisible()

leBool getValueAxisLabelsVisible(const leBarGraphWidget* _this, leBarGraphValueAxis axis);
  • Gets the visible Value Axis label setting

Parameters

leBarGraphWidget*_thisBar Graph widget pointer to operate on
leBarGraphValueAxisaxisValue axis to be checked
Returns the setting value 
  • Returns LE_TRUE if set, otherwise LE_FALSE

setValueAxisLabelsVisible()

leResult setValueAxisLabelsVisible(leBarGraphWidget* _this, leBarGraphValueAxis axis, leBool vis);
  • Sets the visibility of the Value Axis labels

Parameters

leBarGraphWidget*_thisBar Graph widget pointer to operate on
leBarGraphValueAxisaxisValue axis to be checked
leBoolvisThe new label visibility 
  • Returns LE_SUCCESS or LE_FAILURE

getValueAxisTicksVisible()

leBool getValueAxisTicksVisible(const leBarGraphWidget* _this, leBarGraphValueAxis axis);
  • Gets the visible value ticks setting

Parameters

leBarGraphWidget*_thisBar Graph widget pointer to operate on
leBarGraphValueAxisaxisValue axis to be checked
  • Returns the setting value

setValueAxisTicksVisible()

leResult setValueAxisTicksVisible(leBarGraphWidget* _this, leBarGraphValueAxis axis, leBool vis);
  • Sets the visibility of the value axis ticks

Parameters

leBarGraphWidget*_thisBarGraph widget pointer to operate on
leBarGraphValueAxisaxisValue axis to be checked
leBoolvisThe new visibility status
  • Returns LE_SUCCESS or LE_FAILURE

getValueAxisTickInterval()

uint32_t getValueAxisTickInterval(const leBarGraphWidget* _this, leBarGraphValueAxis axis);
  • Gets the value axis tick interval setting

Parameters

leBarGraphWidget*_thisBar Graph widget pointer to operate on
leBarGraphValueAxisaxisValue axis to be checked
  • Returns the tick interval value

setValueAxisTickInterval()

leResult setValueAxisTickInterval(leBarGraphWidget* _this, leBarGraphValueAxis axis, uint32_t itv);
  • Sets the interval of the value axis ticks

Parameters

leBarGraphWidget*_thisBar Graph widget pointer to operate on
leBarGraphValueAxisaxisValue axis to be checked
uint32_titvThe new interval value
  • Returns LE_SUCCESS or LE_FAILURE

getValueAxisTicksPosition()

leBarGraphTickPosition getValueAxisTicksPosition(const leBarGraphWidget* _this, leBarGraphValueAxis axis);
  • Gets the value axis ticks position

Parameters

leBarGraphWidget*_thisBar Graph widget pointer to operate on
leBarGraphValueAxisaxisValue Axis to be checked
  • Returns the value axis ticks position

setValueAxisTicksPosition()

leResult setValueAxisTicksPosition(leBarGraphWidget* _this, leBarGraphValueAxis axis, leBarGraphTickPosition position);
  • Sets the value axis ticks position

Parameters

leBarGraphWidget*_thisBar Graph widget pointer to operate on
leBarGraphValueAxisaxisValue axis to be checked
leBarGraphTickPositionpositionSets the position to BAR_GRAPH_TICK_IN, BAR_GRAPH_TICK_OUT or BAR_GRAPH_TICK_CENTER
  • Returns LE_SUCCESS or LE_FAILURE

getValueAxisSubticksVisible()

leBool getValueAxisSubticksVisible(const leBarGraphWidget* _this, leBarGraphValueAxis axis);
  • Gets the visible value subtick setting

Parameters

leBarGraphWidget*_thisBar Graph widget pointer to operate on
leBarGraphValueAxisaxisValue axis to be checked
  • Returns the setting value

setValueAxisSubticksVisible()

leResult setValueAxisSubticksVisible(leBarGraphWidget* _this, leBarGraphValueAxis axis, leBool vis);
  • Sets the visibility of the value axis subticks

Parameters

leBarGraphWidget*_thisBar Graph widget pointer to operate on
leBarGraphValueAxisaxisValue axis to be checked
leBoolvisThe new visibility setting
  • Returns LE_SUCCESS or LE_FAILURE

getValueAxisSubtickInterval()

uint32_t getValueAxisSubtickInterval(const leBarGraphWidget* _this, leBarGraphValueAxis axis);
  • Gets the value axis subtick interval setting

Parameters

leBarGraphWidget*_thisBar Graph widget pointer to operate on
leBarGraphValueAxisaxisValue axis to be checked
  • Returns the subticks interval value

setValueAxisSubtickInterval()

leResult setValueAxisSubticksInterval(leBarGraphWidget* _this, leBarGraphValueAxis axis, uint32_t itv);
  • Sets the inverval of the value axis subticks

Parameters

leBarGraphWidget*_thisBar Graph widget pointer to operate on
leBarGraphValueAxisaxisValue axis to be checked
uint32_titvThe new interval value
  • Returns LE_SUCCESS or LE_FAILURE

getCategoryAxisTicksVisible()

leBool getCategoryAxisTicksVisible(const leBarGraphWidget* _this);
  • Gets the category axis ticks visible setting

Parameters

leBarGraphWidget*_thisBar Graph widget pointer to operate on
  • Returns the setting value

setCategoryAxisTicksVisible()

leResult setCategoryAxisTicksVisible(leBarGraphWidget* _this, leBool vis);
  • Sets the category axis ticks visible setting

Parameters

leBarGraphWidget*_thisBar Graph widget pointer to operate on
leBoolvisThe new visibility setting
  • Returns LE_SUCCESS or LE_FAILURE

getCategoryAxisTicksPosition()

leBarGraphTickPosition getCategoryAxisTicksPosition(const leBarGraphWidget* _this);
  • Gets the category axis ticks position

Parameters

leBarGraphWidget*_thisBar Graph widget pointer to operate on
  • Returns the category axis ticks position

setCategoryAxisTicksPosition()

leResult setCategoryAxisTicksPosition(leBarGraphWidget* _this, leBarGraphTickPosition position);
  • Sets the category axis ticks position

Parameters

leBarGraphWidget*_thisBar Graph widget pointer to operate on
leBarGraphTickPositionpositionSets the position to BAR_GRAPH_TICK_IN, BAR_GRAPH_TICK_OUT or BAR_GRAPH_TICK_CENTER
  • Returns LE_SUCCESS or LE_FAILURE

getCategoryAxisLabelsVisible()

leBool getCategoryAxisLabelsVisible(const leBarGraphWidget* _this);
  • Gets the category axis labels visible setting

Parameters

leBarGraphWidget*_thisBar Graph widget pointer to operate on
  • Returns the setting

setCategoryAxisLabelsVisible()

leResult setCategoryAxisLabelsVisible(leBarGraphWidget* _this, leBool visible);
  • Sets the category axis labels visible setting

Parameters

leBarGraphWidget*_thisBar Graph widget pointer to operate on
leBoolvisibleSets the labels visibility setting
  • Returns LE_SUCCESS or LE_FAILURE

addSeries()

int32_t addSeries(leBarGraphWidget* _this);
  • Adds a data series to the graph

Parameters

leBarGraphWidget*_thisBar Graph widget pointer to operate on
  • Returns the series ID

getSeriesScheme()

leScheme* getSeriesScheme(const leBarGraphWidget* _this, int32_t seriesID);
  • Gets the scheme for a data series

Parameters

leBarGraphWidget*_thisBar Graph widget pointer to operate on
int32_tseriesIDID of the series that should be checked
  • Returns scheme pointer

setSeriesScheme()

leResult setSeriesScheme(leBarGraphWidget* _this, int32_t seriesID, const leScheme* scheme);
  • Sets the data series scheme

Parameters

leBarGraphWidget*_thisBar 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

addDataToSeries()

int32_t addDataToSeries(leBarGraphWidget* _this, int32_t seriesID, int32_t value);
  • Adds data to an existing series

Parameters

leBarGraphWidget*_thisBar 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(leBarGraphWidget* _this, int32_t seriesID, int32_t index, int32_t value);
  • Sets a new value to an already existing data series

Parameters

leBarGraphWidget*_thisBar 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

clearData()

leResult clearData(leBarGraphWidget* _this);

Clears all graph data.

Parameters

leBarGraphWidget*_thisBar Graph widget pointer to operate on
  • Returns LE_SUCCESS or LE_FAILURE

getTicksLabelFont()

leBool getTicksLabelFont(const leBarGraphWidget* _this);
  • Gets the Ticks font property

Parameters

leBarGraphWidget*_thisBar Graph widget pointer to operate on
  • Returns the property

setTicksLabelFont()

leResult setTicksLabelFont(leBarGraphWidget* _this, const leFont* font);
  • Sets the series point type setting

Parameters

leBarGraphWidget*_thisBar Graph widget pointer to operate on
const leFont*fontThe font that should be used
  • Returns LE_SUCCESS or LE_FAILURE

getGridLinesVisible()

leBool getGridLinesVisible(const leBarGraphWidget* _this, leBarGraphValueAxis axis);
  • Gets the visible grid lines setting

Parameters

leBarGraphWidget*_thisBar Graph widget pointer to operate on
leBarGraphValueAxisaxisValue axis to be checked.
  • Returns the setting value

setGridLinesVisible()

leResult setGridLinesVisible(leBarGraphWidget* _this, leBarGraphValueAxis axis, leBool vis);
  • Sets the visibility of the grid lines

Parameters

leBarGraphWidget*_thisBar Graph widget pointer to operate on
leBarGraphValueAxisaxisValue axis to be checked
leBoolvisThe new visibility setting
  • Returns LE_SUCCESS or LE_FAILURE

addCategory()

int32_t addCategory(leBarGraphWidget* _this);
  • Adds a data category

Parameters

leBarGraphWidget*_thisBar Graph widget pointer to operate on
  • Returns the category ID

getCategoryString()

leString* getCategoryString(const leBarGraphWidget* _this, int32_t id);
  • Gets the string currently assigned to a category

Parameters

leBarGraphWidget*_thisBar Graph widget pointer to operate on
int32_tidID of the category that should be checked
  • Returns string pointer

setCategoryString()

leResult setCategoryString(leBarGraphWidget* _this, int32_t id, const leString* str);
  • Sets the category axis ticks visible setting

Parameters

leBarGraphWidget*_thisBar 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

getStacked()

leBool getStacked(const leBarGraphWidget* _this);
  • Gets the stacked setting

Parameters

leBarGraphWidget*_thisBar Graph widget pointer to operate on
  • Returns the setting value

setStacked()

leResult setStacked(leBarGraphWidget* _this, leBool stk);
  • Sets the stacked status

Parameters

leBarGraphWidget*_thisBar Graph widget pointer to operate on
leBoolstkThe stacked status
  • Returns LE_SUCCESS or LE_FAILURE

getFillGraphArea()

leBool getFillGraphArea(const leBarGraphWidget* _this);
  • Gets the graph fill setting

Parameters

leBarGraphWidget*_thisBar Graph widget pointer to operate on

Returns the setting value.

setFillGraphArea()

leResult setFillGraphArea(leBarGraphWidget* _this, leBool fill);
  • Sets the graph fill setting

Parameters

leBarGraphWidget*_thisBar Graph widget pointer to operate on
leBoolfillThe new fill setting
  • Returns LE_SUCCESS or LE_FAILURE

Back to Top