openui5-chartjs icon indicating copy to clipboard operation
openui5-chartjs copied to clipboard

Is it possible to configure axis with openui5-chartjs

Open MrFigureSkating opened this issue 5 years ago • 0 comments

Sorry if I ask this question not in the right place but I didn't find any other place on the internet where I can ask questions related to openui5-chartjs.

So is it (or will it be) possible to configure axis in a smart way? In the chartjs documentation I found the following chapter: https://www.chartjs.org/docs/latest/axes/cartesian/time.html#time-cartesian-axis But I don't see any possibility to do it in openui5-chartjs. Is it just not implemented or I'm missing something?

What I want to do is to show 2 lines on the same chart. Assume I have 3 points for each dataset. The problem is that the time can be a bit different e.g. 11:00:20, 11:01:20, 11:02:20 for the first dataset and 11:00:30, 11:01:30, 11:02:30 for the second dataset. So I don't know which values I should send to the labels array. Obviously, it would be great if it is possible to show values 11:00:00, 11:01:00, 11:02:00, 11:03:00 on the X axes and to show values somewhere in the middle of each period (11:00:20, 11:00:30 etc). I mean it should look like this: https://www.chartjs.org/samples/latest/scales/time/line.html Is it possible to achieve such behavior somehow?

MrFigureSkating avatar Mar 14 '19 11:03 MrFigureSkating