HABot Walkthrough (8/n): Analyzing Historical Data

This is a wiki topic, regular members as well as staff may edit it freely and are encouraged to do so! The content will eventually be migrated somewhere in the main documentation when it’s stabilized and enough feedback has been received. When replying to posts on this series, please try to stay on-topic - there will be several of them, each covering a particular feature or area, so please look for the appropriate topic and reply there, or create a new topic. Thanks! :slight_smile:


When asked for historical data, HABot is able to display a graph in a specially designed window called the Analyzer. This window is called for a set of items and a period by clicking on the Analyze button.
image

You may also include Analyze buttons for arbitrary items and periods on your own cards in your Card deck: add a HbAnalyzeActionButton component in the “actions” slots of the HbCard.

The Analyzer is able to display multiple time series on an interactive graph. Its goal is not to provide extensive customization options, like colors, rather offer a quick and easy way of combining different series on a period. It works well on phones too!

It is able to automatically group the series with the same unit of measurement on the same y-axis, and move an eventual series with a different unit of measurement to a second y-axis, and use an area style chart for these. Only 2 axes are not supported.

For line charts, you are able to zoom by using the slider at the bottom (or the mouse wheel or a pinch gesture on touch screens):

Note that this zoom feature doesn’t request data from the server after zooming or unzooming, only working with currently loaded data. Therefore you won’t get more precision by zooming, especially with persistence services like rrd4j which consolidate data over time. You have to restrict the period of the chart using the following method to request new, potentially more precise data from the server. Click the wrench menu, it will add a new line to the title bar, then either:

  • use the two date pickers to specify an arbitrary period
  • or the calendar on the right to reset to a predefined period easily:

The menu on the right side of the second line of tools allows to change the type of the chart and configure additional options.

For example, for line charts, you can display markers - lines or points for the average or min/max of the currently displayed data:

The only other chart type currently is the calendar. It is able to display the mean daily value of a single series on a calendar of the selected period. It is useful for longer periods analysis and identifying peaks. Using the legend, you can filter the range of values that will be displayed:

There are 4 colors palettes available in the menu for different purposes:

More chart types may be added in the future, like a timeline for non-numerical series. The Analyzer window is using ECharts, a very powerful charting library developed by Baidu and since then incubated into an Apache Foundation project. ECharts supports an impressive range of chart types.

4 Likes