FIXED: Add support for chart axes ticks and value labels / chart label.
This commit is contained in:
@@ -523,6 +523,17 @@ void lv_chart_refresh(lv_obj_t * chart)
|
||||
lv_obj_invalidate(chart);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the margin around the chart, used for axes value and labels
|
||||
* @param chart pointer to an chart object
|
||||
* @param return margin value of the margin
|
||||
*/
|
||||
uint16_t lv_chart_get_margin(lv_obj_t* chart)
|
||||
{
|
||||
lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
|
||||
return ext->margin;
|
||||
}
|
||||
|
||||
/**********************
|
||||
* STATIC FUNCTIONS
|
||||
**********************/
|
||||
|
||||
@@ -214,6 +214,7 @@ static inline void lv_chart_set_style(lv_obj_t *chart, lv_style_t *style)
|
||||
|
||||
/**
|
||||
* Set the margin around the chart, used for axes value and labels
|
||||
* @param chart pointer to an chart object
|
||||
* @param margin value of the margin
|
||||
*/
|
||||
void lv_chart_set_margin(lv_obj_t* chart, uint16_t margin);
|
||||
@@ -291,6 +292,13 @@ static inline lv_style_t* lv_chart_get_style(const lv_obj_t *chart)
|
||||
return lv_obj_get_style(chart);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the margin around the chart, used for axes value and labels
|
||||
* @param chart pointer to an chart object
|
||||
* @param return margin value of the margin
|
||||
*/
|
||||
uint16_t lv_chart_get_margin(lv_obj_t* chart);
|
||||
|
||||
/*=====================
|
||||
* Other functions
|
||||
*====================*/
|
||||
|
||||
Reference in New Issue
Block a user