MaibornWolff / MaibornWolff/codecharta
Visualisation not correctly handling colors for "inverted" metrics
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 529
- Forks
- 56
- Avg merge
- 7h 17m
- Merged PRs (30d)
- 34
Description
# Bug
## Expected Behavior
WHEN
A map contains metrics with the direction 1 property (indicating higher is better, e.g. coverage)
THEN
The area, height and color metrics correctly adjust to this, by inverting their scale
## Actual Behavior
Only the area and height metrics invert their scale, the colors stay the same.
## Screenshots

Map with direction -1, looks as expected

Same map with direction 1, height is correctly changed but color stays the same (area was selected as unary but works as expected)
## Steps to Reproduce the Problem
1. load attached maps
2. activate exampleWithDirection-1 map, everything looks as expected, higher number means larger, higher and redder
3. activate exampleWithDirection1 map, area and height are correctly inverted but the color does not
## Specifications
- is released in [online-demo](https://maibornwolff.github.io/codecharta/visualization/app/index.html?file=codecharta.cc.json.gz&file=codecharta_analysis.cc.json.gz¤tFilesAreSampleFiles=true): yes
- CodeCharta Version: 1.135.2
- OS: -
- Browser: all
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue in the linked online demo with the direction 1 map, then trace the visualization code that computes color scales alongside area and height scales. Done means color metrics invert their scale for direction 1 while retaining the existing behavior for direction -1.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- data-visualization, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100