Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@
function(formatter) {
return {
restrict: 'E',
scope: {
dates: '=xaxisPoints',
scope: {
firstDataSeries: '=firstDataSeries',
secondDataSeries: '=secondDataSeries',
isDurationGraph: '=isDurationGraph',
Expand Down Expand Up @@ -111,8 +110,10 @@
var firstSeries = scope.firstDataSeries;
var secondSeries = scope.secondDataSeries;

var amountOfValues = Math.max(firstSeries.points.length, secondSeries ? secondSeries.points.length : 0);

var scaleX = d3.scaleLinear()
.domain([0, firstSeries.points.length - 1])
.domain([0, amountOfValues - 1])
.range([leftMargin, width]);

chart.append('rect')
Expand All @@ -122,7 +123,7 @@
.attr('fill', '#F2F6F7');

var minimumYaxis = !isNaN(scope.minimumYaxis) ? Number(scope.minimumYaxis) : 10;
var max = Math.max(firstSeries.average, d3.max(firstSeries.points), minimumYaxis);
var max = Math.max(firstSeries.average, firstSeries.points.length > 0 ? d3.max(firstSeries.points) : 0, minimumYaxis);

if (secondSeries && secondSeries.points.length > 0) {
max = Math.max(max, secondSeries.average, d3.max(secondSeries.points));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ <h1 class="righ-side-ellipsis col-lg-max-10" uib-tooltip="{{endpointName}}">
<!-- here goes diagram -->
<large-graph ng-if="endpoint.metricDetails.metrics.queueLength"
first-data-series="endpoint.metricDetails.metrics.queueLength"
xAxis-points="endpoint.metricDetails.metrics.queueLength.timeAxisValues"
minimum-YAxis="{{largeGraphsMinimumYAxis.queueLength}}"
plot-width="750"
plot-height="200"
Expand Down Expand Up @@ -79,7 +78,6 @@ <h1 class="righ-side-ellipsis col-lg-max-10" uib-tooltip="{{endpointName}}">
<large-graph ng-if="endpoint.metricDetails.metrics.throughput"
first-data-series="endpoint.metricDetails.metrics.throughput"
second-data-series="endpoint.metricDetails.metrics.retries"
xAxis-points="endpoint.metricDetails.metrics.throughput.timeAxisValues"
minimum-YAxis="{{largeGraphsMinimumYAxis.throughputRetries}}"
plot-width="750"
plot-height="200"
Expand Down Expand Up @@ -140,7 +138,6 @@ <h1 class="righ-side-ellipsis col-lg-max-10" uib-tooltip="{{endpointName}}">
<large-graph ng-if="endpoint.metricDetails.metrics.processingTime"
first-data-series="endpoint.metricDetails.metrics.criticalTime"
second-data-series="endpoint.metricDetails.metrics.processingTime"
xAxis-points="endpoint.metricDetails.metrics.criticalTime.timeAxisValues"
minimum-YAxis="{{largeGraphsMinimumYAxis.processingCritical}}"
plot-width="750"
plot-height="200"
Expand Down