Skip to content

Commit

Permalink
Fix dashboard colors with non-white backgrounds (#2911)
Browse files Browse the repository at this point in the history
* fix local variable bug

* add "no-shadow" rule as a warning

* fix two blue lines on line graphs
  • Loading branch information
mariusandra authored Jan 12, 2021
1 parent b70f5b5 commit 1031329
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ module.exports = {
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'no-shadow': 'warn',
curly: 'error',
},
overrides: [
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ style files without adding already imported styles. */
--muted: #{$text_muted};
// Used for graph series
--blue: #{$blue_500};
--purple: #{purple_500};
--purple: #{$purple_500};
--salmon: #ff906e;
--yellow: #ffc035;
--green: #{$success};
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/scenes/insights/LineGraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ export function LineGraph({

function processDataset(dataset, index) {
const colorList = getChartColors(color || 'white')
const color = dataset?.status ? getBarColorFromStatus(dataset.status) : colorList[index]
const borderColor = dataset?.status ? getBarColorFromStatus(dataset.status) : colorList[index]

return {
borderColor: color,
borderColor,
backgroundColor: (type === 'bar' || type === 'doughnut') && color,
fill: false,
borderWidth: 1,
Expand Down

0 comments on commit 1031329

Please sign in to comment.