feat(chart): add lv_chart_set_series_color
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user