MaibornWolff / MaibornWolff/codecharta

Visualisation not correctly handling colors for "inverted" metrics

Open
#4,032 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug pr-visualization UX / UI
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

![Image](https://github.com/user-attachments/assets/08edea8d-9cb9-430f-ac24-3fa5f9f0a7c5)
Map with direction -1, looks as expected

![Image](https://github.com/user-attachments/assets/a8fb82a6-5832-4111-a6be-2059eabf14b8)
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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.