Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions pyawschart/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,15 @@ def _get_datapoints(self):
)
return self._datapoints


def _get_chart(self):
if not self._chart:
datapoints = self._get_datapoints()
data = [datapoint['Average'] for datapoint in self._datapoints]
self._get_datapoints()

key = 'Sum' if self._datapoints and 'Sum' in self._datapoints[0]
else 'Average'
data = [datapoint[key] for datapoint in self._datapoints]

# Set the vertical range from 0 to 100
max_y = 1
if data:
Expand Down
4 changes: 2 additions & 2 deletions pyawschart/elb.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ def __init__(self, cloudwatch_connection=None, instance=None, range=None):
ELBChart.__init__(self, cloudwatch_connection, instance, range)
self.metric_verbose = 'Request count'
self.args['metric'] = 'RequestCount'
self.args['statistics'] = 'Average'
self.args['unit'] = 'Count/Second'
self.args['statistics'] = 'Sum'
self.args['unit'] = 'Count'
CHART_CLASSES.append(RequestCountChart)


Expand Down