Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue: #189
As an addition to the previous commit: To improve the X-axis display, I have separated it from the actual data points so that we always get the 1st day of the respective period displayed evenly in the year or month display. as is typical for stock charts, for example.
1. Set up time axis: The x-axis has been set to the time type in order to display date values correctly.
2. Adjust data points: Changed the parseDataSet method so that each data point contains an object with x (date) and y (value).
3. Configure ticks: The ticks settings provide automatic adjustment and limitation of the tick count to ensure clarity.
4. Formatting of the axes: Depending on the period (day, month, year) the display formats of the x-axis are dynamically adjusted.
Results:
properly displaying years in the beginning of each on the x axis
properly displaying monts in the beginning of each on the x axis