minor fixes

This commit is contained in:
Gabor Kiss-Vamosi
2021-03-10 09:44:17 +01:00
parent 94431f8aaf
commit 22c06a19bc
9 changed files with 63 additions and 51 deletions

View File

@@ -6,9 +6,9 @@ static void event_cb(lv_obj_t * chart, lv_event_t e)
LV_UNUSED(chart);
if(e == LV_EVENT_DRAW_PART_BEGIN) {
lv_obj_draw_hook_dsc_t * hook_dsc = lv_event_get_param();
if(hook_dsc->part == LV_PART_MARKER && hook_dsc->sub_part_id == LV_CHART_AXIS_X) {
if(hook_dsc->part == LV_PART_MARKER && hook_dsc->id == LV_CHART_AXIS_X) {
const char * month[] = {"Jan", "Febr", "March", "Apr", "May", "Jun", "July", "Aug", "Sept", "Oct", "Nov", "Dec"};
lv_snprintf(hook_dsc->text, sizeof(hook_dsc->text), "%s", month[hook_dsc->id]);
lv_snprintf(hook_dsc->text, sizeof(hook_dsc->text), "%s", month[hook_dsc->value]);
}
}
}