You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From discussion #88: The ChartWidget shall be extended to allow users the local selection of different (pre-configured) time intervals. For simpler implementation, this shall not influence the fetching of the data series data, but instead only reconfigure the Chart.js x axis accordingly.
For pre-configuring the available time intervals, the ChartWidget constructor shall be extended with a new (optional) parameter selectable_intervals, taking a list of datetime.timedelta and corresponding label strings. If this parameter is set, the interval parameter must match one of the selectable_intervals entries. It is then used as the default interval, which is shown initially when opening the web page.
If this parameter is set, the list of intervals and corresponding labels is passed to the JavaScript code via the data-spec JSON attribute. The JavaScript shall then create a button group below the chart itself, according to this list. Instead of fetching the time series data for the configured (default) interval, the JavaScript code shall fetch the time series data for the maximum interval defined in the selectable_intervals list. The JavaScript code shall track the current selected interval and update the color of the buttons and the configuration of the Chart.js x-axis accordingly.
The text was updated successfully, but these errors were encountered:
From discussion #88: The
ChartWidget
shall be extended to allow users the local selection of different (pre-configured) time intervals. For simpler implementation, this shall not influence the fetching of the data series data, but instead only reconfigure the Chart.js x axis accordingly.For pre-configuring the available time intervals, the
ChartWidget
constructor shall be extended with a new (optional) parameterselectable_intervals
, taking a list ofdatetime.timedelta
and corresponding label strings. If this parameter is set, theinterval
parameter must match one of theselectable_intervals
entries. It is then used as the default interval, which is shown initially when opening the web page.If this parameter is set, the list of intervals and corresponding labels is passed to the JavaScript code via the
data-spec
JSON attribute. The JavaScript shall then create a button group below the chart itself, according to this list. Instead of fetching the time series data for the configured (default) interval, the JavaScript code shall fetch the time series data for the maximum interval defined in the selectable_intervals list. The JavaScript code shall track the current selected interval and update the color of the buttons and the configuration of the Chart.js x-axis accordingly.The text was updated successfully, but these errors were encountered: