mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
feat(chart): add lv_chart_set_series_color
This commit is contained in:
parent
3f23733961
commit
8106c2f348
@ -390,6 +390,16 @@ void lv_chart_hide_series(lv_obj_t * chart, lv_chart_series_t * series, bool hid
|
||||
lv_chart_refresh(chart);
|
||||
}
|
||||
|
||||
|
||||
void lv_chart_set_series_color(lv_obj_t * chart, lv_chart_series_t * series, lv_color_t color)
|
||||
{
|
||||
LV_ASSERT_OBJ(chart, MY_CLASS);
|
||||
LV_ASSERT_NULL(series);
|
||||
|
||||
series->color = color;
|
||||
lv_chart_refresh(chart);
|
||||
}
|
||||
|
||||
void lv_chart_set_x_start_point(lv_obj_t * obj, lv_chart_series_t * ser, uint16_t id)
|
||||
{
|
||||
LV_ASSERT_OBJ(obj, MY_CLASS);
|
||||
|
@ -265,6 +265,14 @@ void lv_chart_remove_series(lv_obj_t * obj, lv_chart_series_t * series);
|
||||
*/
|
||||
void lv_chart_hide_series(lv_obj_t * chart, lv_chart_series_t * series, bool hide);
|
||||
|
||||
/**
|
||||
* Change the color of a series
|
||||
* @param obj pointer to a chart object.
|
||||
* @param series pointer to a series object
|
||||
* @param color the new color of the series
|
||||
*/
|
||||
void lv_chart_set_series_color(lv_obj_t * chart, lv_chart_series_t * series, lv_color_t color);
|
||||
|
||||
/**
|
||||
* 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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user