Skip to content
This repository has been archived by the owner on Apr 11, 2023. It is now read-only.

Commit

Permalink
we want percentages
Browse files Browse the repository at this point in the history
  • Loading branch information
jmazzitelli committed Apr 20, 2018
1 parent 386bfa8 commit b84a894
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/components/SummaryPanel/InOutRateChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ export default class InOutRateChart extends React.Component<InOutRateChartPropTy
x: {
categories: ['In', 'Out'],
type: 'category'
},
y: {
show: false
}
}}
data={{
Expand Down
2 changes: 1 addition & 1 deletion src/components/SummaryPanel/InOutRateTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default class InOutRateTable extends React.Component<InOutRateTablePropTy
const percentInSuccess: number = 100 - percentInErr;
const percentOutSuccess: number = 100 - percentOutErr;

// for the pie charts
// for the graphs
const rate2xxIn: number =
this.props.inRate === 0
? 0
Expand Down
3 changes: 3 additions & 0 deletions src/components/SummaryPanel/RateChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ export default class RateChart extends React.Component<RateChartPropType> {
x: {
categories: [''],
type: 'category'
},
y: {
show: false
}
}}
data={{
Expand Down
2 changes: 1 addition & 1 deletion src/components/SummaryPanel/RateTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default class RateTable extends React.Component<RateTablePropType, {}> {
const percentErr: number = this.props.rate === 0 ? 0 : errRate / this.props.rate * 100;
const successErr: number = 100 - percentErr;

// for the pie chart
// for the graph
const rate2xx: number =
this.props.rate === 0 ? 0 : this.props.rate - this.props.rate3xx - this.props.rate4xx - this.props.rate5xx;
const percent2xx: number = this.props.rate === 0 ? 0 : rate2xx / this.props.rate * 100;
Expand Down

0 comments on commit b84a894

Please sign in to comment.