diff options
Diffstat (limited to 'app/services/product_analytics/build_graph_service.rb')
-rw-r--r-- | app/services/product_analytics/build_graph_service.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/app/services/product_analytics/build_graph_service.rb b/app/services/product_analytics/build_graph_service.rb index 31f9f093bb9..da54ad4de0e 100644 --- a/app/services/product_analytics/build_graph_service.rb +++ b/app/services/product_analytics/build_graph_service.rb @@ -13,15 +13,19 @@ module ProductAnalytics results = product_analytics_events.count_by_graph(graph, timerange) + format_results(graph, results) + end + + private + + def format_results(name, results) { - id: graph, + id: name, keys: results.keys, values: results.values } end - private - def product_analytics_events @project.product_analytics_events end |