Skip to content

Commit

Permalink
Merge pull request #156 from zalando/new-blips-stars-fixes
Browse files Browse the repository at this point in the history
Uses and documents repo_url and new blips as stars
  • Loading branch information
bocytko committed Jun 24, 2024
2 parents 09b44ce + f30e17d commit 3bb4aef
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Feel free to use and adapt it for your own purposes.

```js
radar_visualization({
repo_url: "https://github.com/zalando/tech-radar",
svg_id: "radar",
width: 1450,
height: 1000,
Expand Down Expand Up @@ -63,6 +64,7 @@ radar_visualization({
moved: -1 // -1 = moved out (triangle pointing down)
// 0 = not moved (circle)
// 1 = moved in (triangle pointing up)
// 2 = new (star)
},
// ...
]
Expand Down
2 changes: 1 addition & 1 deletion docs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@
"label": "Valkey",
"link": "https://engineering.zalando.com/tags/redis.html",
"active": true,
"moved": 1
"moved": 2
},
{
"quadrant": 2,
Expand Down
12 changes: 6 additions & 6 deletions docs/radar.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function radar_visualization(config) {
config.print_layout = config.print_layout || true;
config.links_in_new_tabs = config.links_in_new_tabs || true;
config.repo_url = config.repo_url || '#';
config.print_ring_descriptions_table = config.print_ring_descriptions_table || null;
config.print_ring_descriptions_table = config.print_ring_descriptions_table || false;

// custom random number generator, to make random sequence reproducible
// source: https://stackoverflow.com/questions/521295
Expand Down Expand Up @@ -71,7 +71,7 @@ function radar_visualization(config) {
{ x: -675, y: -420 };

const footer_offset =
{ x: -150, y: 450 };
{ x: -155, y: 450 };

const legend_offset = [
{ x: 450, y: 90 },
Expand Down Expand Up @@ -314,7 +314,7 @@ function radar_visualization(config) {
// footer
radar.append("text")
.attr("transform", translate(footer_offset.x, footer_offset.y))
.text("▲ moved up ▼ moved down ★ new 〇 no change")
.text("▲ moved up ▼ moved down ★ new 〇 no change")
.attr("xml:space", "preserve")
.style("font-family", config.font_family)
.style("font-size", "12px");
Expand Down Expand Up @@ -457,9 +457,9 @@ function radar_visualization(config) {
.attr("d", "M -11,-5 11,-5 0,13 z") // triangle pointing down
.style("fill", d.color);
} else if (d.moved == 2) {
blip.append("path")
.attr("d", d3.symbol().type(d3.symbolStar).size(200))
.style("fill", d.color);
blip.append("path")
.attr("d", d3.symbol().type(d3.symbolStar).size(200))
.style("fill", d.color);
} else {
blip.append("circle")
.attr("r", 9)
Expand Down

0 comments on commit 3bb4aef

Please sign in to comment.