diff --git a/data/interfaces/default/graphs.html b/data/interfaces/default/graphs.html index 15a96a69..006d7ee9 100644 --- a/data/interfaces/default/graphs.html +++ b/data/interfaces/default/graphs.html @@ -301,6 +301,10 @@ return obj; }, {}); + if (!("Total" in chart_visibility)) { + chart_visibility["Total"] = false; + } + return data_series.map(function(s) { var obj = Object.assign({}, s); obj.visible = (chart_visibility[s.name] !== false); @@ -327,7 +331,8 @@ 'Direct Play': '#E5A00D', 'Direct Stream': '#FFFFFF', 'Transcode': '#F06464', - 'Max. Concurrent Streams': '#96C83C' + 'Max. Concurrent Streams': '#96C83C', + 'Total': '#96C83C' }; var series_colors = []; $.each(data_series, function(index, series) { diff --git a/plexpy/graphs.py b/plexpy/graphs.py index 70122aee..771b4eaf 100644 --- a/plexpy/graphs.py +++ b/plexpy/graphs.py @@ -138,6 +138,12 @@ class Graphs(object): if libraries.has_library_type('live'): series_output.append(series_4_output) + if len(series_output) > 0: + series_total = [sum(x) for x in zip(*[x['data'] for x in series_output])] + series_total_output = {'name': 'Total', + 'data': series_total} + series_output.append(series_total_output) + output = {'categories': categories, 'series': series_output} return output