Skip to content

Commit

Permalink
[Frontend]Scenario scores display (#1115)
Browse files Browse the repository at this point in the history
  • Loading branch information
johanah29 committed Jul 16, 2024
1 parent 8ee3666 commit 5089a2b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ const ScenarioDistributionByExercise: FunctionComponent<Props> = ({
'dataPoints',
true,
exercises.length === 0,
1,
) as ApexOptions}
series={series}
type="bar"
Expand Down
27 changes: 15 additions & 12 deletions openbas-front/src/utils/Charts.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ export const areaChartOptions = (
* @param {number | 'dataPoints'} tickAmount
* @param {boolean} isResult
* @param {boolean} isFakeData
* @param {number} max
*/
export const verticalBarsChartOptions = (
theme,
Expand All @@ -271,6 +272,7 @@ export const verticalBarsChartOptions = (
tickAmount = undefined,
isResult = false,
isFakeData = false,
max = undefined,
) => ({
chart: {
type: 'bar',
Expand Down Expand Up @@ -299,9 +301,9 @@ export const verticalBarsChartOptions = (
},
grid: {
borderColor:
theme.palette.mode === 'dark'
? 'rgba(255, 255, 255, .1)'
: 'rgba(0, 0, 0, .1)',
theme.palette.mode === 'dark'
? 'rgba(255, 255, 255, .1)'
: 'rgba(0, 0, 0, .1)',
strokeDashArray: 3,
},
legend: {
Expand Down Expand Up @@ -346,6 +348,7 @@ export const verticalBarsChartOptions = (
axisBorder: {
show: false,
},
max,
},
plotOptions: {
bar: {
Expand Down Expand Up @@ -417,9 +420,9 @@ export const horizontalBarsChartOptions = (
},
grid: {
borderColor:
theme.palette.mode === 'dark'
? 'rgba(255, 255, 255, .1)'
: 'rgba(0, 0, 0, .1)',
theme.palette.mode === 'dark'
? 'rgba(255, 255, 255, .1)'
: 'rgba(0, 0, 0, .1)',
strokeDashArray: 3,
},
legend: {
Expand Down Expand Up @@ -633,16 +636,16 @@ export const polarAreaChartOptions = (
rings: {
strokeWidth: 1,
strokeColor:
theme.palette.mode === 'dark'
? 'rgba(255, 255, 255, .1)'
: 'rgba(0, 0, 0, .1)',
theme.palette.mode === 'dark'
? 'rgba(255, 255, 255, .1)'
: 'rgba(0, 0, 0, .1)',
},
spokes: {
strokeWidth: 1,
connectorColors:
theme.palette.mode === 'dark'
? 'rgba(255, 255, 255, .1)'
: 'rgba(0, 0, 0, .1)',
theme.palette.mode === 'dark'
? 'rgba(255, 255, 255, .1)'
: 'rgba(0, 0, 0, .1)',
},
},
},
Expand Down

0 comments on commit 5089a2b

Please sign in to comment.