# lv_chart.h (/api/widgets/chart/lv_chart_h)



<RelatedHeaders name="lv_chart_private.h" isPrivate="false" />

<ApiSummary functions="45" enums="4" macros="1" variables="1" />

Functions [#functions]

<ApiTabs items="[&#x22;Setters (24)&#x22;,&#x22;Getters (14)&#x22;,&#x22;Other (7)&#x22;]">
  <ApiTab value="Setters (24)">
    <ApiMember kind="function" name="lv_chart_set_type" file="widgets/chart/lv_chart.h" line="93" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L93">
      lv_chart_set_type [#lv_chart_set_type]

      Set a new type for a chart

      ```c title=" " lineNumbers=1
      void lv_chart_set_type(lv_obj_t *obj, lv_chart_type_t type)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name   | Type                                             | Description                                            |
      | ------ | ------------------------------------------------ | ------------------------------------------------------ |
      | `obj`  | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a chart object                              |
      | `type` | <ApiLink name="lv_chart_type_t" />               | new type of the chart (from 'lv\_chart\_type\_t' enum) |
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_set_point_count" file="widgets/chart/lv_chart.h" line="99" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L99">
      lv_chart_set_point_count [#lv_chart_set_point_count]

      Set the number of points on a data line on a chart

      ```c title=" " lineNumbers=1
      void lv_chart_set_point_count(lv_obj_t *obj, uint32_t cnt)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                            |
      | ----- | ------------------------------------------------ | -------------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a chart object              |
      | `cnt` | <ApiLink name="uint32_t" />                      | new number of points on the data lines |
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_set_axis_range" file="widgets/chart/lv_chart.h" line="108" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L108">
      lv_chart_set_axis_range [#lv_chart_set_axis_range]

      Set the minimal and maximal y values on an axis

      ```c title=" " lineNumbers=1
      void lv_chart_set_axis_range(lv_obj_t *obj, lv_chart_axis_t axis, int32_t min, int32_t max)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name   | Type                                             | Description                                              |
      | ------ | ------------------------------------------------ | -------------------------------------------------------- |
      | `obj`  | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a chart object                                |
      | `axis` | <ApiLink name="lv_chart_axis_t" />               | `LV_CHART_AXIS_PRIMARY_Y` or `LV_CHART_AXIS_SECONDARY_Y` |
      | `min`  | <ApiLink name="int32_t" />                       | minimum value of the y axis                              |
      | `max`  | <ApiLink name="int32_t" />                       | maximum value of the y axis                              |
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_set_axis_min_value" file="widgets/chart/lv_chart.h" line="116" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L116">
      lv_chart_set_axis_min_value [#lv_chart_set_axis_min_value]

      Set the minimal values on an axis

      ```c title=" " lineNumbers=1
      void lv_chart_set_axis_min_value(lv_obj_t *obj, lv_chart_axis_t axis, int32_t min)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name   | Type                                             | Description                                              |
      | ------ | ------------------------------------------------ | -------------------------------------------------------- |
      | `obj`  | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a chart object                                |
      | `axis` | <ApiLink name="lv_chart_axis_t" />               | `LV_CHART_AXIS_PRIMARY_Y` or `LV_CHART_AXIS_SECONDARY_Y` |
      | `min`  | <ApiLink name="int32_t" />                       | minimal value of the y axis                              |
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_set_axis_max_value" file="widgets/chart/lv_chart.h" line="124" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L124">
      lv_chart_set_axis_max_value [#lv_chart_set_axis_max_value]

      Set the maximal y values on an axis

      ```c title=" " lineNumbers=1
      void lv_chart_set_axis_max_value(lv_obj_t *obj, lv_chart_axis_t axis, int32_t max)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name   | Type                                             | Description                                              |
      | ------ | ------------------------------------------------ | -------------------------------------------------------- |
      | `obj`  | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a chart object                                |
      | `axis` | <ApiLink name="lv_chart_axis_t" />               | `LV_CHART_AXIS_PRIMARY_Y` or `LV_CHART_AXIS_SECONDARY_Y` |
      | `max`  | <ApiLink name="int32_t" />                       | maximum value of the y axis                              |
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_set_update_mode" file="widgets/chart/lv_chart.h" line="132" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L132">
      lv_chart_set_update_mode [#lv_chart_set_update_mode]

      Set update mode of the chart object. Affects

      ```c title=" " lineNumbers=1
      void lv_chart_set_update_mode(lv_obj_t *obj, lv_chart_update_mode_t update_mode)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name          | Type                                             | Description               |
      | ------------- | ------------------------------------------------ | ------------------------- |
      | `obj`         | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a chart object |
      | `update_mode` | <ApiLink name="lv_chart_update_mode_t" />        | the update mode           |
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_set_div_line_count" file="widgets/chart/lv_chart.h" line="140" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L140">
      lv_chart_set_div_line_count [#lv_chart_set_div_line_count]

      Set the number of horizontal and vertical division lines

      ```c title=" " lineNumbers=1
      void lv_chart_set_div_line_count(lv_obj_t *obj, uint32_t hdiv, uint32_t vdiv)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name   | Type                                             | Description                         |
      | ------ | ------------------------------------------------ | ----------------------------------- |
      | `obj`  | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a chart object           |
      | `hdiv` | <ApiLink name="uint32_t" />                      | number of horizontal division lines |
      | `vdiv` | <ApiLink name="uint32_t" />                      | number of vertical division lines   |
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_set_hor_div_line_count" file="widgets/chart/lv_chart.h" line="147" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L147">
      lv_chart_set_hor_div_line_count [#lv_chart_set_hor_div_line_count]

      Set the number of horizontal division lines

      ```c title=" " lineNumbers=1
      void lv_chart_set_hor_div_line_count(lv_obj_t *obj, uint32_t cnt)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                         |
      | ----- | ------------------------------------------------ | ----------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a chart object           |
      | `cnt` | <ApiLink name="uint32_t" />                      | number of horizontal division lines |
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_set_ver_div_line_count" file="widgets/chart/lv_chart.h" line="154" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L154">
      lv_chart_set_ver_div_line_count [#lv_chart_set_ver_div_line_count]

      Set the number of vertical division lines

      ```c title=" " lineNumbers=1
      void lv_chart_set_ver_div_line_count(lv_obj_t *obj, uint32_t cnt)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                       |
      | ----- | ------------------------------------------------ | --------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a chart object         |
      | `cnt` | <ApiLink name="uint32_t" />                      | number of vertical division lines |
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_set_series_color" file="widgets/chart/lv_chart.h" line="248" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L248">
      lv_chart_set_series_color [#lv_chart_set_series_color]

      Change the color of a series

      ```c title=" " lineNumbers=1
      void lv_chart_set_series_color(lv_obj_t *chart, lv_chart_series_t *series, lv_color_t color)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name     | Type                                                               | Description                 |
      | -------- | ------------------------------------------------------------------ | --------------------------- |
      | `chart`  | <ApiLink name="lv_obj_t" display="lv_obj_t *" />                   | pointer to a chart object.  |
      | `series` | <ApiLink name="lv_chart_series_t" display="lv_chart_series_t *" /> | pointer to a series object  |
      | `color`  | <ApiLink name="lv_color_t" />                                      | the new color of the series |
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_set_x_start_point" file="widgets/chart/lv_chart.h" line="265" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L265">
      lv_chart_set_x_start_point [#lv_chart_set_x_start_point]

      Set the index of the x-axis start point in the data array. This point will be considers the first (left) point and the other points will be drawn after it.

      ```c title=" " lineNumbers=1
      void lv_chart_set_x_start_point(lv_obj_t *obj, lv_chart_series_t *ser, uint32_t id)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                                               | Description                                |
      | ----- | ------------------------------------------------------------------ | ------------------------------------------ |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" />                   | pointer to a chart object                  |
      | `ser` | <ApiLink name="lv_chart_series_t" display="lv_chart_series_t *" /> | pointer to a data series on 'chart'        |
      | `id`  | <ApiLink name="uint32_t" />                                        | the index of the x point in the data array |
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_set_cursor_pos" file="widgets/chart/lv_chart.h" line="301" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L301">
      lv_chart_set_cursor_pos [#lv_chart_set_cursor_pos]

      Set the coordinate of the cursor with respect to the paddings

      ```c title=" " lineNumbers=1
      void lv_chart_set_cursor_pos(lv_obj_t *chart, lv_chart_cursor_t *cursor, lv_point_t *pos)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name     | Type                                                               | Description                                        |
      | -------- | ------------------------------------------------------------------ | -------------------------------------------------- |
      | `chart`  | <ApiLink name="lv_obj_t" display="lv_obj_t *" />                   | pointer to a chart object                          |
      | `cursor` | <ApiLink name="lv_chart_cursor_t" display="lv_chart_cursor_t *" /> | pointer to the cursor                              |
      | `pos`    | <ApiLink name="lv_point_t" display="lv_point_t *" />               | the new coordinate of cursor relative to the chart |
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_set_cursor_pos_x" file="widgets/chart/lv_chart.h" line="309" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L309">
      lv_chart_set_cursor_pos_x [#lv_chart_set_cursor_pos_x]

      Set the X coordinate of the cursor with respect to the paddings

      ```c title=" " lineNumbers=1
      void lv_chart_set_cursor_pos_x(lv_obj_t *chart, lv_chart_cursor_t *cursor, int32_t x)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name     | Type                                                               | Description                                          |
      | -------- | ------------------------------------------------------------------ | ---------------------------------------------------- |
      | `chart`  | <ApiLink name="lv_obj_t" display="lv_obj_t *" />                   | pointer to a chart object                            |
      | `cursor` | <ApiLink name="lv_chart_cursor_t" display="lv_chart_cursor_t *" /> | pointer to the cursor                                |
      | `x`      | <ApiLink name="int32_t" />                                         | the new X coordinate of cursor relative to the chart |
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_set_cursor_pos_y" file="widgets/chart/lv_chart.h" line="317" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L317">
      lv_chart_set_cursor_pos_y [#lv_chart_set_cursor_pos_y]

      Set the coordinate of the cursor with respect to the paddings

      ```c title=" " lineNumbers=1
      void lv_chart_set_cursor_pos_y(lv_obj_t *chart, lv_chart_cursor_t *cursor, int32_t y)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name     | Type                                                               | Description                                          |
      | -------- | ------------------------------------------------------------------ | ---------------------------------------------------- |
      | `chart`  | <ApiLink name="lv_obj_t" display="lv_obj_t *" />                   | pointer to a chart object                            |
      | `cursor` | <ApiLink name="lv_chart_cursor_t" display="lv_chart_cursor_t *" /> | pointer to the cursor                                |
      | `y`      | <ApiLink name="int32_t" />                                         | the new Y coordinate of cursor relative to the chart |
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_set_cursor_point" file="widgets/chart/lv_chart.h" line="326" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L326">
      lv_chart_set_cursor_point [#lv_chart_set_cursor_point]

      Stick the cursor to a point

      ```c title=" " lineNumbers=1
      void lv_chart_set_cursor_point(lv_obj_t *chart, lv_chart_cursor_t *cursor, lv_chart_series_t *ser, uint32_t point_id)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name       | Type                                                               | Description                                                             |
      | ---------- | ------------------------------------------------------------------ | ----------------------------------------------------------------------- |
      | `chart`    | <ApiLink name="lv_obj_t" display="lv_obj_t *" />                   | pointer to a chart object                                               |
      | `cursor`   | <ApiLink name="lv_chart_cursor_t" display="lv_chart_cursor_t *" /> | pointer to the cursor                                                   |
      | `ser`      | <ApiLink name="lv_chart_series_t" display="lv_chart_series_t *" /> | pointer to a series                                                     |
      | `point_id` | <ApiLink name="uint32_t" />                                        | the point's index or `LV_CHART_POINT_NONE` to not assign to any points. |
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_set_all_values" file="widgets/chart/lv_chart.h" line="347" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L347">
      lv_chart_set_all_values [#lv_chart_set_all_values]

      Initialize all data points of a series with a value

      ```c title=" " lineNumbers=1
      void lv_chart_set_all_values(lv_obj_t *obj, lv_chart_series_t *ser, int32_t value)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name    | Type                                                               | Description                                                                         |
      | ------- | ------------------------------------------------------------------ | ----------------------------------------------------------------------------------- |
      | `obj`   | <ApiLink name="lv_obj_t" display="lv_obj_t *" />                   | pointer to chart object                                                             |
      | `ser`   | <ApiLink name="lv_chart_series_t" display="lv_chart_series_t *" /> | pointer to a data series on 'chart'                                                 |
      | `value` | <ApiLink name="int32_t" />                                         | the new value for all points. `LV_CHART_POINT_NONE` can be used to hide the points. |
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_set_next_value" file="widgets/chart/lv_chart.h" line="355" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L355">
      lv_chart_set_next_value [#lv_chart_set_next_value]

      Set the next point's Y value according to the update mode policy.

      ```c title=" " lineNumbers=1
      void lv_chart_set_next_value(lv_obj_t *obj, lv_chart_series_t *ser, int32_t value)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name    | Type                                                               | Description                         |
      | ------- | ------------------------------------------------------------------ | ----------------------------------- |
      | `obj`   | <ApiLink name="lv_obj_t" display="lv_obj_t *" />                   | pointer to chart object             |
      | `ser`   | <ApiLink name="lv_chart_series_t" display="lv_chart_series_t *" /> | pointer to a data series on 'chart' |
      | `value` | <ApiLink name="int32_t" />                                         | the new value of the next data      |
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_set_next_value2" file="widgets/chart/lv_chart.h" line="364" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L364">
      lv_chart_set_next_value2 [#lv_chart_set_next_value2]

      Set the next point's X and Y value according to the update mode policy.

      ```c title=" " lineNumbers=1
      void lv_chart_set_next_value2(lv_obj_t *obj, lv_chart_series_t *ser, int32_t x_value, int32_t y_value)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name      | Type                                                               | Description                         |
      | --------- | ------------------------------------------------------------------ | ----------------------------------- |
      | `obj`     | <ApiLink name="lv_obj_t" display="lv_obj_t *" />                   | pointer to chart object             |
      | `ser`     | <ApiLink name="lv_chart_series_t" display="lv_chart_series_t *" /> | pointer to a data series on 'chart' |
      | `x_value` | <ApiLink name="int32_t" />                                         | the new X value of the next data    |
      | `y_value` | <ApiLink name="int32_t" />                                         | the new Y value of the next data    |
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_set_series_values" file="widgets/chart/lv_chart.h" line="373" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L373">
      lv_chart_set_series_values [#lv_chart_set_series_values]

      Same as `lv_chart_set_next_value` but set the values from an array

      ```c title=" " lineNumbers=1
      void lv_chart_set_series_values(lv_obj_t *obj, lv_chart_series_t *ser, const int32_t values[], size_t values_cnt)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name         | Type                                                               | Description                         |
      | ------------ | ------------------------------------------------------------------ | ----------------------------------- |
      | `obj`        | <ApiLink name="lv_obj_t" display="lv_obj_t *" />                   | pointer to chart object             |
      | `ser`        | <ApiLink name="lv_chart_series_t" display="lv_chart_series_t *" /> | pointer to a data series on 'chart' |
      | `values`     | <ApiLink name="int32_t" display="const int32_t" />                 | the new values to set               |
      | `values_cnt` | <ApiLink name="size_t" />                                          | number of items in `values`         |
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_set_series_values2" file="widgets/chart/lv_chart.h" line="383" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L383">
      lv_chart_set_series_values2 [#lv_chart_set_series_values2]

      Same as `lv_chart_set_next_value2` but set the values from an array

      ```c title=" " lineNumbers=1
      void lv_chart_set_series_values2(lv_obj_t *obj, lv_chart_series_t *ser, const int32_t x_values[], const int32_t y_values[], size_t values_cnt)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name         | Type                                                               | Description                                  |
      | ------------ | ------------------------------------------------------------------ | -------------------------------------------- |
      | `obj`        | <ApiLink name="lv_obj_t" display="lv_obj_t *" />                   | pointer to chart object                      |
      | `ser`        | <ApiLink name="lv_chart_series_t" display="lv_chart_series_t *" /> | pointer to a data series on 'chart'          |
      | `x_values`   | <ApiLink name="int32_t" display="const int32_t" />                 | the new values to set on the X axis          |
      | `y_values`   | <ApiLink name="int32_t" display="const int32_t" />                 | the new values to set o nthe Y axis          |
      | `values_cnt` | <ApiLink name="size_t" />                                          | number of items in `x_values` and `y_values` |
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_set_series_value_by_id" file="widgets/chart/lv_chart.h" line="393" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L393">
      lv_chart_set_series_value_by_id [#lv_chart_set_series_value_by_id]

      Set an individual point's y value of a chart's series directly based on its index

      ```c title=" " lineNumbers=1
      void lv_chart_set_series_value_by_id(lv_obj_t *obj, lv_chart_series_t *ser, uint32_t id, int32_t value)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name    | Type                                                               | Description                           |
      | ------- | ------------------------------------------------------------------ | ------------------------------------- |
      | `obj`   | <ApiLink name="lv_obj_t" display="lv_obj_t *" />                   | pointer to a chart object             |
      | `ser`   | <ApiLink name="lv_chart_series_t" display="lv_chart_series_t *" /> | pointer to a data series on 'chart'   |
      | `id`    | <ApiLink name="uint32_t" />                                        | the index of the x point in the array |
      | `value` | <ApiLink name="int32_t" />                                         | value to assign to array point        |
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_set_series_value_by_id2" file="widgets/chart/lv_chart.h" line="404" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L404">
      lv_chart_set_series_value_by_id2 [#lv_chart_set_series_value_by_id2]

      Set an individual point's x and y value of a chart's series directly based on its index Can be used only with `LV_CHART_TYPE_SCATTER`.

      ```c title=" " lineNumbers=1
      void lv_chart_set_series_value_by_id2(lv_obj_t *obj, lv_chart_series_t *ser, uint32_t id, int32_t x_value, int32_t y_value)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name      | Type                                                               | Description                           |
      | --------- | ------------------------------------------------------------------ | ------------------------------------- |
      | `obj`     | <ApiLink name="lv_obj_t" display="lv_obj_t *" />                   | pointer to chart object               |
      | `ser`     | <ApiLink name="lv_chart_series_t" display="lv_chart_series_t *" /> | pointer to a data series on 'chart'   |
      | `id`      | <ApiLink name="uint32_t" />                                        | the index of the x point in the array |
      | `x_value` | <ApiLink name="int32_t" />                                         | the new X value of the next data      |
      | `y_value` | <ApiLink name="int32_t" />                                         | the new Y value of the next data      |
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_set_series_ext_y_array" file="widgets/chart/lv_chart.h" line="414" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L414">
      lv_chart_set_series_ext_y_array [#lv_chart_set_series_ext_y_array]

      Set an external array for the y data points to use for the chart NOTE: It is the users responsibility to make sure the `point_cnt` matches the external array size.

      ```c title=" " lineNumbers=1
      void lv_chart_set_series_ext_y_array(lv_obj_t *obj, lv_chart_series_t *ser, int32_t array[])
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name    | Type                                                               | Description                         |
      | ------- | ------------------------------------------------------------------ | ----------------------------------- |
      | `obj`   | <ApiLink name="lv_obj_t" display="lv_obj_t *" />                   | pointer to a chart object           |
      | `ser`   | <ApiLink name="lv_chart_series_t" display="lv_chart_series_t *" /> | pointer to a data series on 'chart' |
      | `array` | <ApiLink name="int32_t" />                                         | external array of points for chart  |
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_set_series_ext_x_array" file="widgets/chart/lv_chart.h" line="423" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L423">
      lv_chart_set_series_ext_x_array [#lv_chart_set_series_ext_x_array]

      Set an external array for the x data points to use for the chart NOTE: It is the users responsibility to make sure the `point_cnt` matches the external array size.

      ```c title=" " lineNumbers=1
      void lv_chart_set_series_ext_x_array(lv_obj_t *obj, lv_chart_series_t *ser, int32_t array[])
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name    | Type                                                               | Description                         |
      | ------- | ------------------------------------------------------------------ | ----------------------------------- |
      | `obj`   | <ApiLink name="lv_obj_t" display="lv_obj_t *" />                   | pointer to a chart object           |
      | `ser`   | <ApiLink name="lv_chart_series_t" display="lv_chart_series_t *" /> | pointer to a data series on 'chart' |
      | `array` | <ApiLink name="int32_t" />                                         | external array of points for chart  |
    </ApiMember>
  </ApiTab>

  <ApiTab value="Getters (14)">
    <ApiMember kind="function" name="lv_chart_get_type" file="widgets/chart/lv_chart.h" line="161" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L161">
      lv_chart_get_type [#lv_chart_get_type]

      Get the type of a chart

      ```c title=" " lineNumbers=1
      lv_chart_type_t lv_chart_get_type(const lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                                   | Description             |
      | ----- | ------------------------------------------------------ | ----------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="const lv_obj_t *" /> | pointer to chart object |

      **Returns:** <ApiLink name="lv_chart_type_t" /> — type of the chart (from 'lv\_chart\_t' enum)
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_get_point_count" file="widgets/chart/lv_chart.h" line="168" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L168">
      lv_chart_get_point_count [#lv_chart_get_point_count]

      Get the data point number per data line on chart

      ```c title=" " lineNumbers=1
      uint32_t lv_chart_get_point_count(const lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                                   | Description             |
      | ----- | ------------------------------------------------------ | ----------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="const lv_obj_t *" /> | pointer to chart object |

      **Returns:** <ApiLink name="uint32_t" /> — point number on each data line
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_get_update_mode" file="widgets/chart/lv_chart.h" line="175" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L175">
      lv_chart_get_update_mode [#lv_chart_get_update_mode]

      Get the update mode of a chart

      ```c title=" " lineNumbers=1
      lv_chart_update_mode_t lv_chart_get_update_mode(const lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                                   | Description               |
      | ----- | ------------------------------------------------------ | ------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="const lv_obj_t *" /> | pointer to a chart object |

      **Returns:** <ApiLink name="lv_chart_update_mode_t" /> — the update mode
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_get_hor_div_line_count" file="widgets/chart/lv_chart.h" line="182" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L182">
      lv_chart_get_hor_div_line_count [#lv_chart_get_hor_div_line_count]

      Get the number of horizontal division lines

      ```c title=" " lineNumbers=1
      uint32_t lv_chart_get_hor_div_line_count(const lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                                   | Description               |
      | ----- | ------------------------------------------------------ | ------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="const lv_obj_t *" /> | pointer to a chart object |

      **Returns:** <ApiLink name="uint32_t" /> — the number of horizontal division lines
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_get_ver_div_line_count" file="widgets/chart/lv_chart.h" line="189" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L189">
      lv_chart_get_ver_div_line_count [#lv_chart_get_ver_div_line_count]

      Get the number of vertical division lines

      ```c title=" " lineNumbers=1
      uint32_t lv_chart_get_ver_div_line_count(const lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                                   | Description               |
      | ----- | ------------------------------------------------------ | ------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="const lv_obj_t *" /> | pointer to a chart object |

      **Returns:** <ApiLink name="uint32_t" /> — the number of vertical division lines
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_get_x_start_point" file="widgets/chart/lv_chart.h" line="197" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L197">
      lv_chart_get_x_start_point [#lv_chart_get_x_start_point]

      Get the current index of the x-axis start point in the data array

      ```c title=" " lineNumbers=1
      uint32_t lv_chart_get_x_start_point(const lv_obj_t *obj, lv_chart_series_t *ser)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                                               | Description                         |
      | ----- | ------------------------------------------------------------------ | ----------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="const lv_obj_t *" />             | pointer to a chart object           |
      | `ser` | <ApiLink name="lv_chart_series_t" display="lv_chart_series_t *" /> | pointer to a data series on 'chart' |

      **Returns:** <ApiLink name="uint32_t" /> — the index of the current x start point in the data array
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_get_point_pos_by_id" file="widgets/chart/lv_chart.h" line="206" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L206">
      lv_chart_get_point_pos_by_id [#lv_chart_get_point_pos_by_id]

      Get the position of a point to the chart.

      ```c title=" " lineNumbers=1
      void lv_chart_get_point_pos_by_id(lv_obj_t *obj, lv_chart_series_t *ser, uint32_t id, lv_point_t *p_out)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name    | Type                                                               | Description                    |
      | ------- | ------------------------------------------------------------------ | ------------------------------ |
      | `obj`   | <ApiLink name="lv_obj_t" display="lv_obj_t *" />                   | pointer to a chart object      |
      | `ser`   | <ApiLink name="lv_chart_series_t" display="lv_chart_series_t *" /> | pointer to series              |
      | `id`    | <ApiLink name="uint32_t" />                                        | the index.                     |
      | `p_out` | <ApiLink name="lv_point_t" display="lv_point_t *" />               | store the result position here |
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_get_series_color" file="widgets/chart/lv_chart.h" line="256" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L256">
      lv_chart_get_series_color [#lv_chart_get_series_color]

      Get the color of a series

      ```c title=" " lineNumbers=1
      lv_color_t lv_chart_get_series_color(lv_obj_t *chart, const lv_chart_series_t *series)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name     | Type                                                                     | Description                |
      | -------- | ------------------------------------------------------------------------ | -------------------------- |
      | `chart`  | <ApiLink name="lv_obj_t" display="lv_obj_t *" />                         | pointer to a chart object. |
      | `series` | <ApiLink name="lv_chart_series_t" display="const lv_chart_series_t *" /> | pointer to a series object |

      **Returns:** <ApiLink name="lv_color_t" /> — the color of the series
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_get_series_next" file="widgets/chart/lv_chart.h" line="273" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L273">
      lv_chart_get_series_next [#lv_chart_get_series_next]

      Get the next series.

      ```c title=" " lineNumbers=1
      lv_chart_series_t * lv_chart_get_series_next(const lv_obj_t *chart, const lv_chart_series_t *ser)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name    | Type                                                                     | Description                                  |
      | ------- | ------------------------------------------------------------------------ | -------------------------------------------- |
      | `chart` | <ApiLink name="lv_obj_t" display="const lv_obj_t *" />                   | pointer to a chart                           |
      | `ser`   | <ApiLink name="lv_chart_series_t" display="const lv_chart_series_t *" /> | the previous series or NULL to get the first |

      **Returns:** <ApiLink name="lv_chart_series_t" display="lv_chart_series_t *" /> — the next series or NULL if there is no more.
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_get_cursor_point" file="widgets/chart/lv_chart.h" line="335" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L335">
      lv_chart_get_cursor_point [#lv_chart_get_cursor_point]

      Get the coordinate of the cursor with respect to the paddings

      ```c title=" " lineNumbers=1
      lv_point_t lv_chart_get_cursor_point(lv_obj_t *chart, lv_chart_cursor_t *cursor)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name     | Type                                                               | Description               |
      | -------- | ------------------------------------------------------------------ | ------------------------- |
      | `chart`  | <ApiLink name="lv_obj_t" display="lv_obj_t *" />                   | pointer to a chart object |
      | `cursor` | <ApiLink name="lv_chart_cursor_t" display="lv_chart_cursor_t *" /> | pointer to cursor         |

      **Returns:** <ApiLink name="lv_point_t" /> — coordinate of the cursor as <ApiLink name="lv_point_t" />
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_get_series_y_array" file="widgets/chart/lv_chart.h" line="431" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L431">
      lv_chart_get_series_y_array [#lv_chart_get_series_y_array]

      Get the array of y values of a series

      ```c title=" " lineNumbers=1
      int32_t * lv_chart_get_series_y_array(const lv_obj_t *obj, lv_chart_series_t *ser)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                                               | Description                         |
      | ----- | ------------------------------------------------------------------ | ----------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="const lv_obj_t *" />             | pointer to a chart object           |
      | `ser` | <ApiLink name="lv_chart_series_t" display="lv_chart_series_t *" /> | pointer to a data series on 'chart' |

      **Returns:** <ApiLink name="int32_t" display="int32_t *" /> — the array of values with 'point\_count' elements
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_get_series_x_array" file="widgets/chart/lv_chart.h" line="439" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L439">
      lv_chart_get_series_x_array [#lv_chart_get_series_x_array]

      Get the array of x values of a series

      ```c title=" " lineNumbers=1
      int32_t * lv_chart_get_series_x_array(const lv_obj_t *obj, lv_chart_series_t *ser)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                                               | Description                         |
      | ----- | ------------------------------------------------------------------ | ----------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="const lv_obj_t *" />             | pointer to a chart object           |
      | `ser` | <ApiLink name="lv_chart_series_t" display="lv_chart_series_t *" /> | pointer to a data series on 'chart' |

      **Returns:** <ApiLink name="int32_t" display="int32_t *" /> — the array of values with 'point\_count' elements
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_get_pressed_point" file="widgets/chart/lv_chart.h" line="446" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L446">
      lv_chart_get_pressed_point [#lv_chart_get_pressed_point]

      Get the index of the currently pressed point. It's the same for every series.

      ```c title=" " lineNumbers=1
      uint32_t lv_chart_get_pressed_point(const lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                                   | Description               |
      | ----- | ------------------------------------------------------ | ------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="const lv_obj_t *" /> | pointer to a chart object |

      **Returns:** <ApiLink name="uint32_t" /> — the index of the point \[0 .. point count] or LV\_CHART\_POINT\_ID\_NONE if no point is being pressed
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_get_first_point_center_offset" file="widgets/chart/lv_chart.h" line="454" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L454">
      lv_chart_get_first_point_center_offset [#lv_chart_get_first_point_center_offset]

      Get the overall offset from the chart's side to the center of the first point. In case of a bar chart it will be the center of the first column group

      ```c title=" " lineNumbers=1
      int32_t lv_chart_get_first_point_center_offset(lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description               |
      | ----- | ------------------------------------------------ | ------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a chart object |

      **Returns:** <ApiLink name="int32_t" /> — the offset of the center
    </ApiMember>
  </ApiTab>

  <ApiTab value="Other (7)">
    <ApiMember kind="function" name="lv_chart_create" file="widgets/chart/lv_chart.h" line="86" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L86">
      lv_chart_create [#lv_chart_create]

      Create a chart object

      ```c title=" " lineNumbers=1
      lv_obj_t * lv_chart_create(lv_obj_t *parent)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name     | Type                                             | Description                                                  |
      | -------- | ------------------------------------------------ | ------------------------------------------------------------ |
      | `parent` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to an object, it will be the parent of the new chart |

      **Returns:** <ApiLink name="lv_obj_t" display="lv_obj_t *" /> — pointer to the created chart
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_refresh" file="widgets/chart/lv_chart.h" line="212" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L212">
      lv_chart_refresh [#lv_chart_refresh]

      Refresh a chart if its data line has changed

      ```c title=" " lineNumbers=1
      void lv_chart_refresh(lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description             |
      | ----- | ------------------------------------------------ | ----------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to chart object |
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_add_series" file="widgets/chart/lv_chart.h" line="225" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L225">
      lv_chart_add_series [#lv_chart_add_series]

      Allocate and add a data series to the chart

      ```c title=" " lineNumbers=1
      lv_chart_series_t * lv_chart_add_series(lv_obj_t *obj, lv_color_t color, lv_chart_axis_t axis)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name    | Type                                             | Description                                                                                                                                                                                        |
      | ------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
      | `obj`   | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a chart object                                                                                                                                                                          |
      | `color` | <ApiLink name="lv_color_t" />                    | color of the data series                                                                                                                                                                           |
      | `axis`  | <ApiLink name="lv_chart_axis_t" />               | the y axis to which the series should be attached (<ApiLink name="lv_chart_axis_t" display="LV_CHART_AXIS_PRIMARY_Y" /> or <ApiLink name="lv_chart_axis_t" display="LV_CHART_AXIS_SECONDARY_Y" />) |

      **Returns:** <ApiLink name="lv_chart_series_t" display="lv_chart_series_t *" /> — pointer to the allocated data series or NULL on failure
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_remove_series" file="widgets/chart/lv_chart.h" line="232" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L232">
      lv_chart_remove_series [#lv_chart_remove_series]

      Deallocate and remove a data series from a chart

      ```c title=" " lineNumbers=1
      void lv_chart_remove_series(lv_obj_t *obj, lv_chart_series_t *series)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name     | Type                                                               | Description                         |
      | -------- | ------------------------------------------------------------------ | ----------------------------------- |
      | `obj`    | <ApiLink name="lv_obj_t" display="lv_obj_t *" />                   | pointer to a chart object           |
      | `series` | <ApiLink name="lv_chart_series_t" display="lv_chart_series_t *" /> | pointer to a data series on 'chart' |
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_hide_series" file="widgets/chart/lv_chart.h" line="240" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L240">
      lv_chart_hide_series [#lv_chart_hide_series]

      Hide/Unhide a single series of a chart.

      ```c title=" " lineNumbers=1
      void lv_chart_hide_series(lv_obj_t *chart, lv_chart_series_t *series, bool hide)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name     | Type                                                               | Description                |
      | -------- | ------------------------------------------------------------------ | -------------------------- |
      | `chart`  | <ApiLink name="lv_obj_t" display="lv_obj_t *" />                   | pointer to a chart object. |
      | `series` | <ApiLink name="lv_chart_series_t" display="lv_chart_series_t *" /> | pointer to a series object |
      | `hide`   | <ApiLink name="bool" />                                            | true: hide the series      |
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_add_cursor" file="widgets/chart/lv_chart.h" line="286" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L286">
      lv_chart_add_cursor [#lv_chart_add_cursor]

      Add a cursor with a given color

      ```c title=" " lineNumbers=1
      lv_chart_cursor_t * lv_chart_add_cursor(lv_obj_t *obj, lv_color_t color, lv_dir_t dir)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name    | Type                                             | Description                                                                                  |
      | ------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------- |
      | `obj`   | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to chart object                                                                      |
      | `color` | <ApiLink name="lv_color_t" />                    | color of the cursor                                                                          |
      | `dir`   | <ApiLink name="lv_dir_t" />                      | direction of the cursor. `LV_DIR_RIGHT/LEFT/TOP/DOWN/HOR/VER/ALL`. OR-ed values are possible |

      **Returns:** <ApiLink name="lv_chart_cursor_t" display="lv_chart_cursor_t *" /> — pointer to the created cursor
    </ApiMember>

    <ApiMember kind="function" name="lv_chart_remove_cursor" file="widgets/chart/lv_chart.h" line="293" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L293">
      lv_chart_remove_cursor [#lv_chart_remove_cursor]

      Remove a cursor

      ```c title=" " lineNumbers=1
      void lv_chart_remove_cursor(lv_obj_t *obj, lv_chart_cursor_t *cursor)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name     | Type                                                               | Description             |
      | -------- | ------------------------------------------------------------------ | ----------------------- |
      | `obj`    | <ApiLink name="lv_obj_t" display="lv_obj_t *" />                   | pointer to chart object |
      | `cursor` | <ApiLink name="lv_chart_cursor_t" display="lv_chart_cursor_t *" /> | pointer to the cursor   |
    </ApiMember>
  </ApiTab>
</ApiTabs>

Enums [#enums]

<ApiMember kind="enum" name="lv_chart_type_t" file="widgets/chart/lv_chart.h" line="36" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L36">
  lv_chart_type_t [#lv_chart_type_t]

  Chart types

  | Name                    | Description                                                                  |
  | ----------------------- | ---------------------------------------------------------------------------- |
  | `LV_CHART_TYPE_NONE`    | Don't draw the series                                                        |
  | `LV_CHART_TYPE_LINE`    | Connect the points with lines                                                |
  | `LV_CHART_TYPE_CURVE`   | Connect the points with curves                                               |
  | `LV_CHART_TYPE_BAR`     | Draw bars for each series                                                    |
  | `LV_CHART_TYPE_STACKED` | Draw a single stacked bar for each data point. Supports only positive values |
  | `LV_CHART_TYPE_SCATTER` | Draw points and lines in 2D (x,y coordinates)                                |
</ApiMember>

<TypeUsedBy name="lv_chart_type_t" count="1">
  * `lv_chart_set_type` — param `type`
</TypeUsedBy>

<ApiMember kind="enum" name="lv_chart_update_mode_t" file="widgets/chart/lv_chart.h" line="48" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L48">
  lv_chart_update_mode_t [#lv_chart_update_mode_t]

  Chart update mode for `lv_chart_set_next`

  | Name                            | Description                                              |
  | ------------------------------- | -------------------------------------------------------- |
  | `LV_CHART_UPDATE_MODE_SHIFT`    | Shift old data to the left and add the new one the right |
  | `LV_CHART_UPDATE_MODE_CIRCULAR` | Add the new data in a circular way                       |
</ApiMember>

<TypeUsedBy name="lv_chart_update_mode_t" count="1">
  * `lv_chart_set_update_mode` — param `update_mode`
</TypeUsedBy>

<ApiMember kind="enum" name="lv_chart_axis_t" file="widgets/chart/lv_chart.h" line="56" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L56">
  lv_chart_axis_t [#lv_chart_axis_t]

  Enumeration of the axis'

  | Name                        | Value  |
  | --------------------------- | ------ |
  | `LV_CHART_AXIS_PRIMARY_Y`   | `0x00` |
  | `LV_CHART_AXIS_SECONDARY_Y` | `0x01` |
  | `LV_CHART_AXIS_PRIMARY_X`   | `0x02` |
  | `LV_CHART_AXIS_SECONDARY_X` | `0x04` |
  | `LV_CHART_AXIS_LAST`        |        |
</ApiMember>

<TypeUsedBy name="lv_chart_axis_t" count="4">
  * `lv_chart_set_axis_range` — param `axis`
  * `lv_chart_set_axis_min_value` — param `axis`
  * `lv_chart_set_axis_max_value` — param `axis`
  * `lv_chart_add_series` — param `axis`
</TypeUsedBy>

<ApiMember kind="enum" name="_lv_property_chart_id_t" file="widgets/chart/lv_chart.h" line="67" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L67">
  \_lv_property_chart_id_t [#_lv_property_chart_id_t]

  | Name                                   | Value                                                          |
  | -------------------------------------- | -------------------------------------------------------------- |
  | `LV_PROPERTY_CHART_TYPE`               | `(LV_PROPERTY_CHART_START + ((int) 0 )) \| ((  1   ) <<  28 )` |
  | `LV_PROPERTY_CHART_POINT_COUNT`        | `(LV_PROPERTY_CHART_START + ((int) 1 )) \| ((  1   ) <<  28 )` |
  | `LV_PROPERTY_CHART_UPDATE_MODE`        | `(LV_PROPERTY_CHART_START + ((int) 2 )) \| ((  1   ) <<  28 )` |
  | `LV_PROPERTY_CHART_HOR_DIV_LINE_COUNT` | `(LV_PROPERTY_CHART_START + ((int) 3 )) \| ((  1   ) <<  28 )` |
  | `LV_PROPERTY_CHART_VER_DIV_LINE_COUNT` | `(LV_PROPERTY_CHART_START + ((int) 4 )) \| ((  1   ) <<  28 )` |
  | `LV_PROPERTY_CHART_END`                |                                                                |
</ApiMember>

Macros [#macros]

<ApiMember kind="macro" name="LV_CHART_POINT_NONE" file="widgets/chart/lv_chart.h" line="26" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L26">
  LV_CHART_POINT_NONE [#lv_chart_point_none]

  ```c title=" " lineNumbers=1
  #define LV_CHART_POINT_NONE (INT32_MAX)
  ```

  Default value of points. Can be used to not draw a point
</ApiMember>

Variables [#variables]

<ApiMember kind="variable" name="lv_chart_class" file="widgets/chart/lv_chart.h" line="64" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/chart/lv_chart.h#L64">
  lv_chart_class [#lv_chart_class]

  ```c title=" " lineNumbers=1
  const lv_obj_class_t lv_chart_class
  ```
</ApiMember>

Dependencies [#dependencies]

<FileIncludes includes="[&#x22;lv_conf_internal.h&#x22;, &#x22;lv_obj.h&#x22;]" includedBy="[&#x22;lv_chart_private.h&#x22;]" transitiveIncludes="[&#x22;lv_anim.h&#x22;, &#x22;lv_area.h&#x22;, &#x22;lv_array.h&#x22;, &#x22;lv_assert.h&#x22;, &#x22;lv_bidi.h&#x22;, &#x22;lv_color.h&#x22;, &#x22;lv_color_op.h&#x22;, &#x22;lv_conf_kconfig.h&#x22;, &#x22;lv_display.h&#x22;, &#x22;lv_draw.h&#x22;, &#x22;lv_draw_arc.h&#x22;, &#x22;lv_draw_blur.h&#x22;, &#x22;lv_draw_buf.h&#x22;, &#x22;lv_draw_image.h&#x22;, &#x22;lv_draw_label.h&#x22;, &#x22;lv_draw_line.h&#x22;, &#x22;lv_draw_rect.h&#x22;, &#x22;lv_draw_triangle.h&#x22;, &#x22;lv_event.h&#x22;, &#x22;lv_ext_data.h&#x22;, &#x22;lv_flex.h&#x22;, &#x22;lv_font.h&#x22;, &#x22;lv_fs.h&#x22;, &#x22;lv_grad.h&#x22;, &#x22;lv_grid.h&#x22;, &#x22;lv_group.h&#x22;, &#x22;lv_image_decoder.h&#x22;, &#x22;lv_image_dsc.h&#x22;, &#x22;lv_indev.h&#x22;, &#x22;lv_layout.h&#x22;, &#x22;lv_ll.h&#x22;, &#x22;lv_log.h&#x22;, &#x22;lv_math.h&#x22;, &#x22;lv_matrix.h&#x22;, &#x22;lv_mem.h&#x22;, &#x22;lv_obj_class.h&#x22;, &#x22;lv_obj_draw.h&#x22;, &#x22;lv_obj_event.h&#x22;, &#x22;lv_obj_pos.h&#x22;, &#x22;lv_obj_property.h&#x22;, &#x22;lv_obj_property_names.h&#x22;, &#x22;lv_obj_scroll.h&#x22;, &#x22;lv_obj_style.h&#x22;, &#x22;lv_obj_style_gen.h&#x22;, &#x22;lv_obj_tree.h&#x22;, &#x22;lv_palette.h&#x22;, &#x22;lv_profiler.h&#x22;, &#x22;lv_profiler_builtin.h&#x22;, &#x22;lv_sprintf.h&#x22;, &#x22;lv_string.h&#x22;, &#x22;lv_style.h&#x22;, &#x22;lv_style_gen.h&#x22;, &#x22;lv_style_properties.h&#x22;, &#x22;lv_symbol_def.h&#x22;, &#x22;lv_text.h&#x22;, &#x22;lv_tick.h&#x22;, &#x22;lv_timer.h&#x22;, &#x22;lv_types.h&#x22;]" />
