How to assign ticks on a chart a specific (round) value?
I’m creating a chart, where the X axis is a time axis. Time is passing, and my X axis range is moving with it:
lv_chart_set_axis_tick(chart, LV_CHART_AXIS_PRIMARY_X, 5, 5, 5, 1, true, 30);
if (real_time < 1000) {
lv_chart_set_range(chart, LV_CHART_AXIS_PRIMARY_X, 0, 1000);
} else {
lv_chart_set_range(chart, LV_CHART_AXIS_PRIMARY_X, real_time - 1000,
real_time);
}
But the ticks have assigned values that are equal to max_range/num_of_ticks, which is not what I want. I’d like the ticks to represent the round numbers and move along as the chart advances. example images
I don’t think I’m explaining it clearly, but the pictures show it: I want to make a chart so that the ticks are not dependent on current range, but are round values that can be seen on the chart at the moment.
The picture of a screen is my current set up, with drawn-on the desired effect, and the screenshot is what I want to achieve.
What MCU/Processor/Board and compiler are you using?
ESP32 on Sunton 8048S070-C
What LVGL version are you using?
8.3