The History component makes it possible to plot a value in a chart that changes in real time, while preserving its historical data. If that sounds confusing, think about the stock market charts that track the fluctuation of a stock price. At the start of the day, the line in such a chart is short, while at the end of the day the complete trend of the stock price for that day is shown. This recipe will show you how to set up this kind of functionality in your dashboard.
The History component picks up a value from a certain source cell (cell B1 in this recipe) and pastes it in a horizontal or vertical range of cells, which in fact store the history of the value. These cells are bound to a chart and so a real-time changing graph is created.
The History component has, besides binding to the source and destination cells, only one other setting. You can determine when a value should be pasted to the destination cells. This can be either when the data changes or on an interval of a certain number of seconds. This component works in the background and will therefore not be shown during runtime.
If you need more series of real-time changing values in your chart, just use more History components to accomplish this.
Another important feature is that in some cases, we can use the History component to remember values from a query so that we can avoid re-running queries when we need to look at past data from past queries.