GUIX Line Graph

Tried using the GUIX Line Graph widget.  Wouldn't compile - all kinds of "not defined".  I looked in the manual and didn't see any docs on it.  Does it work?

Bill

  • Hello Bill

    What version of GUIX do you use?

  • In reply to Sergey Sokol:

    5.3.2.0  Some of the provided examples wouldn't open with the older version so now I'm using this one.

  • In reply to wflynn:

    Hello Bill,

    Which SSP version is your project using? I'm looking at GUIX Studio 5.3.2.2 (which goes with SSP 1.2.0-b1) and I can't see line graph on a widget list. Graphs such as the one from medical demo are drawn dynamically on an empty window using custom drawing functions.

    Regards

  • In reply to Karol:

    Hi Karol,

    Line chart widget is indeed available in GUIX Studio 5.3.2.2 with SSP 1.2.0-b1.

    I'm too trying it out without any luck. Any document about that is available anywhere?

    Regards,

    Sivamurugan

  • In reply to siva:

    Hi Sivamurugan,

     

    Here's the API list for Line Chart widget:

    • gx_line_chart_create - Creates a line chart widget.
    • gx_line_chart_axis_draw - Draws the x,y chart axis of a line chart.
    • gx_line_chart_data_draw - Draws the chart data line.
    • gx_line_chart_draw - Draws a line chart. Calls gx_line_chart_axis_draw and gx_line_chart_data_draw.
    • gx_line_chart_update - Updates the data array associated with a line chart.
    • gx_line_chart_y_scale_calculate - Calculates chart y axis scale value (does not apply the scale to the data).

     

    So in your application should call these functions in the following order:

    0. gx_line_chart_create - should be already called in the code generated by GUIX Studio

    1. (optional) gx_line_chart_y_scale_calculate and apply the scale factor, it depends on widget dimensions and min/max value of the data

    2. gx_line_chart_update - supply the chart with the data, the widget will be redrawn automatically

     

    Regards,

    adboc

  • In reply to siva:

    Hello Sivamurugan,

    I'm attaching a simple example implementing line chart refreshing dynamically every 20ms: s7_sk_gx_line_chart_1_2_0.zip

    Regards

  • In reply to Renesas Karol:

    Hi Karol,

    Thanks for the sample. I will check that.

    Regards,
    Sivamurugan
  • In reply to siva:

    Hi Karol,

    The sample works fine. Thanks for the support.

    Regards,
    Sivamurugan
  • In reply to adboc:

    Hi adboc,

    Thanks for the api details. It made easy to work with the sample karol provided.

    Regards,
    Sivamurugan