ripper234
ripper234

Reputation: 230028

How to use HighCharts to plot aggregate hourly event rates?

I'm persisting every application error I get to our DB, and exposing it as an endpoint that gives a time series of errors:

[[1354445413000,1],[1354445502000,1],[1354445522000,1]]

Format is (Timestamp, 1), (second value is always 1), the series contain a value per error I have in the system.

What's the easiest way to get HighCharts to show a periodic aggregate chart with drilldown - something that shows N error events per day, and can be drilled down to an hourly or zoomed out to a weekly resolution? (note that zooming changes the actual data being displayed, not just the resolution).

Drill-down & zoom out are not essential, my first focus is just getting HighCharts to aggregate the data for me.

Upvotes: 2

Views: 2767

Answers (1)

wergeld
wergeld

Reputation: 14442

HighCharts will not aggregate data for you - it takes a string of data points and plots them. Perhaps you should look at their other charting library HighStock and the dataGrouping method. The dataGrouping system is pretty good - lets you decide what kind of aggregate to use (sum, average, etc) and you can tell it what to group by in time units down to a millisecond.

Upvotes: 3

Related Questions