Zoom and pan are synchronized, changed afterBuildTicksSignature

This commit is contained in:
l_samenv
2024-09-13 15:47:53 +02:00
parent 05a77ce2f4
commit 6c1a13c382
2 changed files with 35 additions and 28 deletions

View File

@ -6,8 +6,18 @@ This repository contains the code of the server for the control and graphical pa
**IMPORTANT**
This version has an update frequency of 5 seconds in order to have a software that can be used for a certain amount of time without crashing (due to memory leaks of ChartJS 2.9.4).
A migration attempt can be found on the branch `chartjs-migration`.
This branch is an attempt to migrate from ChartJS 2.9.4 to 4.4.4.
Here is a list of what has been done :
- Uprgaded the ChartJS zoom plugin library, and changed the corresponding options in the chart configuration. The previous version was not working with the version 4.4.4 of ChartJS
- Installing the date library Luxon and its adpater for ChartJS. This is needed because since version 3.x, time axes need these libraries.
- Renamed or moved all needed parameters in the ChartJS configuration.
- Changed all `xAxes` and `yAxes` references to `x` and `y`.
- Adapted `afterBuildTicks` callbacks with the new signature (only `axis` is given)
Here is a list of what needs to be done :
- Change the implementation of the callback located in `options.scales.x.ticks` at chart creation in the Chart class, so it considers that the label is a timestamp. Reference : https://www.chartjs.org/docs/latest/axes/labelling.html#creating-custom-tick-formats
**Summary**
@ -146,4 +156,4 @@ For the `generic.ini` and `<instrument>.ini` files, go to `./doc/variables_confi
- For choosing the color, the user should have the possibility to use a color picker to choose an arbitrary color, without loosing the possibility to choose one of the predefined color
- Finally, for maitenance, an idea could be to have the possibility for an informed user to send its configuration to directly overwrite the `<instrument>.ini` file.
- For the export :
- The binning option should be checked since the user changes the input.
- The binning option should be checked since the user changes the input.