FIXED: Add support for chart axes ticks and value labels / chart label.

This commit is contained in:
user-0
2019-03-23 23:59:12 +02:00
parent db4f4f0360
commit 81696b85d0
2 changed files with 19 additions and 0 deletions

View File

@@ -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
**********************/

View File

@@ -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
*====================*/