One simple way of having KBM display a "dashboard" kind of chart I found is to...
- turn numbers into a string of █ characters (i.e. a value of 5 becomes █████, etc.)
- on each run, append a text file with the current value on a new line
- on each run, display the text file's contents in a "Display Text" window, and close the previous one
This gives me a simple "dashboard" style graph for single values.
This is an example, where ping response times are "graphed" over time by KBM in a text file:
But can one do more complex graphs with KBM?
Example:
I buy Facebook ads. Every 5 minutes, I have KBM grab my current stats from Facebook - amount spent so far, number of impressions, number of clicks, etc..
Then, I have KBM compute the cost per click for the last interval:
(current "spent" value minus previous "spent" value)
divided by
(current "clicks" value minus previous "clicks" value)
I'd now like KBM to draw several graphs for me, which are always kept up to date.
For instance, a cumulative record of how many clicks my ad got over time (x axis would be "minutes since first entry", y axis would be "clicks"). Such a graph would look like this:
For my purposes, it would be enough if KBM only drew the axes and placed a dot for each new value. I don't need an actual curve drawn through the data points.
Or, for the cost-per-click value, I'd like a graph that displays this value over time (x-axis: minutes since first data point; y-axis: cost per click during last interval). This chart would look similar to this:
The axes should automatically adapt, so that the dataset is always displayed fully on the available screen space of the chart. And the labels on the axes should also intelligently update, so that they remain readable.
What would be the easiest and simplest way to accomplish this?
I know that I could have KBM enter the data into an Excel Spreadsheet or a Google Sheet, and have the graphs created there. But I would prefer not having to deal with some external application.
I imagine that there might be, perhaps, some kind of JavaScript library for turning data into beautiful graphs. And that, using it, all the coding required in KBM would be to...
- invoke that library,
- tell it what kind of graph I want,
- tell it what data to use for x and y
- and then tell it where to display the graph.
Any ideas how this could be accomplished? Thanks.